/* OceanVibes Legal */
:root {
	--ov-teal: #087D8C;
	--ov-dark: #083C49;
	--ov-orange: #FF5A24;
}

/* Páginas legales */
.ov-legal { max-width: 860px; margin: 0 auto; line-height: 1.65; color: var(--ov-dark); }
.ov-legal h2 { margin-top: 2em; font-size: 1.35em; }
.ov-legal h3 { margin-top: 1.4em; font-size: 1.1em; }
.ov-legal a { color: var(--ov-teal); text-decoration: underline; }
.ov-legal-pendiente { background: #FFE08A; color: #5a3c00; padding: 0 .25em; border-radius: 3px; }
.ov-legal-table-wrap { overflow-x: auto; }
.ov-legal-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.ov-legal-table th, .ov-legal-table td { border: 1px solid #d5e3e6; padding: .5em .7em; text-align: left; vertical-align: top; }
.ov-legal-table th { background: #eef6f7; }
.ov-legal-fecha { margin-top: 2.5em; opacity: .75; }

/* Plantilla propia de las páginas legales */
body.ov-legal-page {
	margin: 0;
	background: #F4F9FA;
	color: var(--ov-dark);
	font-family: var(--e-global-typography-text-font-family, "Inter"), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
}
.ov-legal-page *, .ov-legal-page *::before, .ov-legal-page *::after { box-sizing: border-box; }
.ov-lp-wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ov-lp-skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--ov-dark); padding: 8px 12px; z-index: 100000; }
.ov-lp-skip:focus { left: 8px; }

.ov-lp-header { background: var(--ov-dark); }
.ov-lp-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.ov-lp-logo { display: inline-flex; align-items: center; color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; }
.ov-lp-logo img { display: block; width: auto; height: 52px; max-width: 200px; object-fit: contain; border-radius: 6px; }
.ov-lp-header-actions { display: flex; align-items: center; gap: 12px; }
.ov-lp-back {
	display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 18px;
	border-radius: 999px; background: var(--ov-orange); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
}
.ov-lp-back:hover { background: #e94812; color: #fff; }
.ov-lp-back:focus-visible, .ov-lp-footer a:focus-visible, .ov-lp-logo:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.ov-lp-main { padding: 48px 0 64px; }
.ov-lp-main .ov-lp-wrap { max-width: 900px; }
.ov-lp-title { margin: 0 0 24px; font-size: clamp(28px, 5vw, 40px); line-height: 1.15; color: var(--ov-dark); }
.ov-lp-content { background: #fff; border-radius: 16px; padding: clamp(20px, 4vw, 48px); box-shadow: 0 2px 16px rgba(8, 60, 73, .06); }
.ov-lp-content .ov-legal { max-width: none; }
.ov-lp-content .ov-legal h2:first-child { margin-top: 0; }
.ov-lp-content ul { padding-left: 1.2em; }
.ov-lp-content li { margin: .3em 0; }

.ov-lp-footer { background: var(--ov-teal); color: #fff; padding: 32px 0; font-size: 14px; }
.ov-lp-footer a { color: #fff; }
.ov-lp-legal-nav ul { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0 0 16px; padding: 0; }
.ov-lp-legal-nav a { text-decoration: none; opacity: .9; }
.ov-lp-legal-nav a:hover, .ov-lp-legal-nav a[aria-current] { opacity: 1; text-decoration: underline; }
.ov-lp-contact, .ov-lp-copy { margin: 4px 0; opacity: .9; }

@media (max-width: 600px) {
	.ov-lp-header-inner { min-height: 64px; }
	.ov-lp-logo img { height: 40px; max-width: 140px; }
	.ov-lp-back { padding: 8px 14px; font-size: 14px; }
	.ov-lp-main { padding: 28px 0 48px; }
	.ov-lp-legal-nav ul { flex-direction: column; gap: 10px; }
}
@media (max-width: 380px) {
	.ov-lp-back span[aria-hidden] { display: none; }
}

/* Banner */
.ov-cookie-banner {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998;
	background: #fff; color: var(--ov-dark);
	box-shadow: 0 -4px 24px rgba(8, 60, 73, .18);
	border-top: 4px solid var(--ov-teal);
	padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	font-size: 15px; line-height: 1.5;
}
.ov-cookie-banner[hidden], .ov-cookie-modal[hidden] { display: none !important; }
.ov-cookie-inner { max-width: 1140px; margin: 0 auto; display: flex; gap: 16px 32px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ov-cookie-text { flex: 1 1 420px; }
.ov-cookie-text p { margin: 0; }
.ov-cookie-title { font-weight: 700; font-size: 17px; margin: 0 0 4px !important; }
.ov-cookie-banner a, .ov-cookie-modal a { color: var(--ov-teal); text-decoration: underline; }

/* Botones: aceptar y rechazar con la misma relevancia (criterio AEPD) */
.ov-cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ov-btn {
	appearance: none; cursor: pointer; font: inherit; font-weight: 700;
	min-height: 44px; padding: 10px 18px; border-radius: 999px;
	border: 2px solid var(--ov-teal); background: var(--ov-teal); color: #fff;
}
.ov-btn:hover { background: var(--ov-dark); border-color: var(--ov-dark); }
.ov-btn[data-ov-action="config"], .ov-btn[data-ov-action="save"] { background: #fff; color: var(--ov-teal); }
.ov-btn[data-ov-action="config"]:hover, .ov-btn[data-ov-action="save"]:hover { background: #eef6f7; }
.ov-btn:focus-visible, .ov-cookie-close:focus-visible, .ov-switch:focus-visible { outline: 3px solid var(--ov-orange); outline-offset: 2px; }

@media (max-width: 767px) {
	.ov-cookie-actions { width: 100%; }
	.ov-cookie-actions .ov-btn { flex: 1 1 30%; padding: 10px 8px; }
}

/* Panel */
.ov-cookie-lock { overflow: hidden; }
.ov-cookie-modal {
	position: fixed; inset: 0; z-index: 99999;
	background: rgba(8, 60, 73, .55);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ov-cookie-dialog {
	position: relative; background: #fff; color: var(--ov-dark);
	width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
	border-radius: 14px; padding: 24px; font-size: 15px; line-height: 1.5;
}
.ov-cookie-close {
	position: absolute; top: 10px; right: 12px; width: 40px; height: 40px;
	border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ov-dark);
}
.ov-cookie-cat { border-top: 1px solid #e3eef0; padding: 14px 0; }
.ov-cookie-cat label { display: flex; gap: 16px; align-items: center; justify-content: space-between; cursor: pointer; }
.ov-cookie-cat small { opacity: .8; }
.ov-always { font-size: 13px; color: var(--ov-teal); white-space: nowrap; font-style: normal; font-weight: 700; }
.ov-switch {
	appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px;
	background: #c5d3d6; position: relative; cursor: pointer; transition: background .2s;
}
.ov-switch::after {
	content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
	border-radius: 50%; background: #fff; transition: transform .2s;
}
.ov-switch:checked { background: var(--ov-teal); }
.ov-switch:checked::after { transform: translateX(20px); }
.ov-cookie-dialog .ov-cookie-actions { margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
	.ov-switch, .ov-switch::after { transition: none; }
}
