/* Gestión de cookies adaptada de FONDOSEUROPEOS. */

[hidden] { display: none !important; }
.cookie-footer { margin-top: 24px; padding-block: 22px; border-top: 1px solid var(--line); }
.cookie-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 28px; }
.cookie-footer a { font-size: 15px; color: var(--muted); text-underline-offset: 3px; }
.brand .cookie-brand-title { font-size: clamp(30px, 4.2vw, 48px); font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 6px; }

.cookie-banner{position:fixed;z-index:90;bottom:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:28px;width:calc(100% - 32px);max-width:1168px;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow:auto;padding:25px 28px;border:1px solid var(--line);border-top:4px solid var(--red);border-radius:24px;color:var(--ink);background:#fff;box-shadow:0 8px 50px #0002}
.cookie-banner-copy{flex:1;min-width:0}
.cookie-banner h2{margin:0 0 10px;font-size:22px;line-height:1.2;font-weight:800}
.cookie-banner p{margin:0 0 10px;font-size:14px;line-height:1.6}
.cookie-banner a,.cookie-policy-content a,.cookie-policy-page nav a{text-decoration:underline;text-underline-offset:3px}
.cookie-banner a{font-size:14px;font-weight:600}
#cookie-form{flex:0 0 350px;min-width:0}
.cookie-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cookie-actions button,.cookie-dialog-done{min-height:48px;padding:12px 16px;border:2px solid var(--red);border-radius:28px;background:var(--red);color:#fff;font:600 14px/1.4 Arial,Helvetica,sans-serif;cursor:pointer}
.cookie-actions button:hover:enabled,.cookie-dialog-done:hover{background:#fff;color:var(--red)}
.cookie-actions button:disabled{opacity:.65;cursor:wait}
#cookie-error{margin:0;color:#a51d2d}
#cookie-error:not(:empty){margin-top:12px}
#cookie-banner-space{height:280px}
#cookies-dialog{width:calc(100% - 32px);max-width:760px;max-height:85vh;max-height:85dvh;padding:28px;border:1px solid var(--line);border-radius:24px;overflow:auto;color:var(--ink);background:#fff;box-shadow:0 20px 80px #0003}
#cookies-dialog:not([open]){display:none}
#cookies-dialog::backdrop{background:#07111bc4;backdrop-filter:blur(3px)}
.cookie-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:18px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.cookie-dialog-header h2{margin:0;font-size:25px;line-height:1.2;font-weight:800}
.cookie-dialog-header button{flex-shrink:0;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:var(--soft-red);color:var(--red);font:400 28px/1 Arial,Helvetica,sans-serif;cursor:pointer}
.cookie-dialog-header button:hover{background:var(--red);color:#fff}
.cookie-dialog-open{overflow:hidden}
.cookie-policy-page{max-width:920px;padding-block:42px}
.cookie-policy-page h1{font-size:clamp(28px,5vw,42px);line-height:1.15;font-weight:800}
.cookie-policy-content h2{margin:26px 0 10px;font-size:20px;line-height:1.3}
.cookie-policy-content p,.cookie-policy-content dd,.cookie-policy-page>p{font-size:15px;line-height:1.75}
.cookie-details{margin:20px 0}
.cookie-details dt{margin:18px 0 8px;font-size:15px;font-weight:700;overflow-wrap:anywhere}
.cookie-details dd{margin:0}
.cookie-video-placeholder{padding:24px 18px;border:2px solid var(--line);border-radius:16px;background:var(--soft-red);color:var(--ink);text-align:center;max-height:100%;overflow:auto}
.cookie-video-placeholder p{font-size:16px;line-height:1.6}
.cookie-video-placeholder a{display:inline-block;padding:12px 18px;border:2px solid var(--red);border-radius:28px;font-size:15px;font-weight:600}
.cookie-video-placeholder a + a { margin-top: 12px; }
.video-frame:has(.cookie-video-placeholder) { display: grid; place-items: center; max-height: 100%; overflow: auto; }
@media (max-width:900px){
  .cookie-banner{flex-direction:column;align-items:stretch;gap:18px}
  #cookie-form{flex:auto}
  #cookie-banner-space{height:350px}
}
@media print { .cookie-banner, #cookie-banner-space, #cookies-dialog { display: none !important; } }
@media (max-width:520px){
  .cookie-banner{bottom:10px;width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:20px;gap:16px;border-radius:20px}
  .cookie-banner h2{font-size:20px}
  .cookie-actions{grid-template-columns:1fr;gap:10px}
  #cookie-banner-space{height:450px}
  #cookies-dialog{padding:20px}
  .cookie-dialog-header h2{font-size:21px}
}
