/* ── Cookie banner and settings (public website, views/partials/cookie_consent.php) ──
   Unlayered, on top of app.css tokens. "Reject" and "Accept" share size and
   weight, as the AEPD's cookie guide asks: neither is hidden behind the other. */
.cookie-banner {
    position: fixed; z-index: 900; left: 50%; bottom: 20px; transform: translateX(-50%);
    width: min(860px, calc(100vw - 32px));
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px 18px;
    padding: 18px 20px; border-radius: 16px;
    background: #fff; color: #1b2733; border: 1px solid #dde3e9;
    box-shadow: 0 18px 50px rgba(16, 35, 53, .18), 0 2px 6px rgba(16, 35, 53, .08);
    font-size: 15px; line-height: 1.5;
    animation: cookie-in .28s ease-out;
}
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .cookie-banner { animation: none; } }
.cookie-banner__icon { width: 40px; height: 40px; border-radius: 12px; background: #f3fbd9; color: #4d6a0f; display: inline-flex; align-items: center; justify-content: center; align-self: start; }
.cookie-banner__text { margin: 0; }
.cookie-banner__text a, .cookie-modal a { color: #1f5f99; text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.cookie-btn {
    font: inherit; font-weight: 650; font-size: 15px; line-height: 1;
    min-height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer;
    border: 1.5px solid transparent; white-space: nowrap;
}
.cookie-btn:focus-visible { outline: 3px solid #1f5f99; outline-offset: 2px; }
.cookie-btn--solid { background: #c9f24c; border-color: #c9f24c; color: #1b2733; }
.cookie-btn--solid:hover { background: #b8e33a; border-color: #b8e33a; }
.cookie-btn--dark { background: #1b2733; border-color: #1b2733; color: #fff; }
.cookie-btn--dark:hover { background: #0f1923; }
.cookie-btn--outline { background: #fff; border-color: #1b2733; color: #1b2733; }
.cookie-btn--outline:hover { background: #f4f6f8; }
.cookie-btn--link { background: transparent; color: #1b2733; text-decoration: underline; text-underline-offset: 3px; padding: 0 8px; }

.cookie-modal { max-width: 640px; }
.cookie-modal .info-modal__body > p:first-child { margin-bottom: 14px; }
.cookie-cat { border: 1px solid var(--c-border); border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.cookie-cat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.info-modal__body .cookie-cat__title { margin: 0 0 4px; font-size: var(--fs-15, 15px); text-transform: none; letter-spacing: 0; color: var(--c-text); }
.cookie-cat__text { margin: 0 !important; color: var(--c-muted); font-size: 14px; }
.cookie-cat__always { flex: none; font-size: 13px; font-weight: 700; color: #3f6212; background: #ecfccb; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.cookie-cat__none { margin: 8px 0 0 !important; font-size: 14px; color: var(--c-muted); font-style: italic; }
.cookie-cat__list { margin-top: 10px; }
.cookie-cat__list summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--c-text); }
.cookie-table-wrap { overflow-x: auto; margin-top: 8px; }
.cookie-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cookie-table th, .cookie-table td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--c-border); }
.cookie-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); }
.cookie-table code { font-size: 12px; white-space: nowrap; }

.cookie-switch { position: relative; flex: none; width: 48px; height: 28px; cursor: pointer; }
.cookie-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cookie-switch__track { position: absolute; inset: 0; border-radius: 999px; background: #c3ccd5; transition: background .15s; }
.cookie-switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.cookie-switch input:checked + .cookie-switch__track { background: #4d7c0f; }
.cookie-switch input:checked + .cookie-switch__track::after { transform: translateX(20px); }
.cookie-switch input:focus-visible + .cookie-switch__track { outline: 3px solid #1f5f99; outline-offset: 2px; }
.cookie-modal__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* Footer link that opens the settings. */
.cookie-settings-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.cookie-settings-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .cookie-banner { grid-template-columns: auto 1fr; bottom: 12px; padding: 16px; font-size: 14px; }
    .cookie-banner__actions { grid-column: 1 / -1; justify-content: stretch; }
    .cookie-banner__actions .cookie-btn--dark, .cookie-banner__actions .cookie-btn--solid { flex: 1 1 0; }
    .cookie-banner__actions .cookie-btn--link { order: 3; flex-basis: 100%; }
    .cookie-modal__actions .cookie-btn { flex: 1 1 100%; }
}
