/* ============================================================
   COOKIES — estilo Alfisconta (vidro escuro + azul-claro #66ccff)
   ============================================================ */

html.ac-cookie-bloqueio { overflow: hidden; }

/* ---------- Banner ---------- */
.ac-cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 22px;
    width: min(720px, calc(100% - 28px));
    z-index: 99999;
    padding: 22px 24px;
    border-radius: 18px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    background: rgba(8, 14, 24, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(102, 204, 255, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 24px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
}
.ac-cookie-banner.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}
/* linha de destaque no topo, como a sublinha do menu */
.ac-cookie-banner::before {
    content: "";
    position: absolute;
    top: 0; left: 24px; right: 24px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, #66ccff, rgba(102, 204, 255, 0));
}

.ac-cookie-cabeca {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.ac-cookie-icone {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: #66ccff;
    background: rgba(102, 204, 255, 0.12);
    border: 1px solid rgba(102, 204, 255, 0.28);
}
.ac-cookie-titulo {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}
.ac-cookie-text {
    margin: 0 0 16px;
    font-size: .92rem;
    line-height: 1.55;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.82);
}
.ac-cookie-text a,
.ac-cookie-modal-box a {
    color: #66ccff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Botões ---------- */
.ac-cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.ac-btn {
    font-family: inherit;
    font-size: .9rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.ac-btn:focus-visible { outline: 2px solid #66ccff; outline-offset: 2px; }
.ac-btn:active { transform: translateY(1px); }

/* Aceitar e recusar têm o mesmo peso visual (RGPD) */
.ac-btn-primary {
    color: #06121f;
    background: #66ccff;
    box-shadow: 0 6px 18px rgba(102, 204, 255, 0.35);
}
.ac-btn-primary:hover { background: #8ad9ff; }
.ac-btn-secondary {
    color: #66ccff;
    background: transparent;
    border-color: rgba(102, 204, 255, 0.65);
}
.ac-btn-secondary:hover { background: rgba(102, 204, 255, 0.12); }
.ac-btn-light {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}
.ac-btn-light:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- Modal ---------- */
.ac-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s;
}
.ac-cookie-modal.is-open { opacity: 1; visibility: visible; }

.ac-cookie-modal-box {
    width: min(520px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 26px 22px;
    border-radius: 20px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    background: rgba(8, 14, 24, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(102, 204, 255, 0.10);
    transform: translateY(12px);
    transition: transform .25s ease;
}
.ac-cookie-modal.is-open .ac-cookie-modal-box { transform: translateY(0); }
.ac-cookie-modal-box h3 { margin: 0 0 6px; font-size: 1.15rem; font-weight: 600; color: #fff; }
.ac-cookie-modal-intro { margin: 0 0 16px; font-size: .88rem; line-height: 1.5; font-weight: 300; color: rgba(255, 255, 255, 0.75); }

/* Cada categoria: texto + interruptor */
.ac-cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    cursor: pointer;
}
.ac-cookie-option strong { display: block; font-size: .95rem; font-weight: 600; color: #fff; }
.ac-cookie-option small  { display: block; margin-top: 3px; font-size: .8rem; line-height: 1.4; font-weight: 300; color: rgba(255, 255, 255, 0.68); }
.ac-cookie-option.fixa { cursor: default; }

/* Interruptor (checkbox por baixo, acessível) */
.ac-cookie-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    position: relative;
    width: 46px; height: 26px;
    margin: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    transition: background .2s ease, border-color .2s ease;
}
.ac-cookie-option input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.ac-cookie-option input[type="checkbox"]:checked { background: #66ccff; border-color: #66ccff; }
.ac-cookie-option input[type="checkbox"]:checked::after { transform: translateX(20px); background: #06121f; }
.ac-cookie-option input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }
.ac-cookie-option input[type="checkbox"]:focus-visible { outline: 2px solid #66ccff; outline-offset: 2px; }

.ac-cookie-modal-buttons {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}
.ac-cookie-modal-link { margin: 14px 0 0; font-size: .8rem; font-weight: 300; color: rgba(255, 255, 255, 0.65); }

/* ---------- Telemóvel ---------- */
@media (max-width: 560px) {
    .ac-cookie-banner { bottom: 10px; padding: 18px 16px; }
    .ac-cookie-buttons .ac-btn,
    .ac-cookie-modal-buttons .ac-btn { flex: 1 1 100%; }
    .ac-cookie-buttons .ac-btn-primary,
    .ac-cookie-modal-buttons .ac-btn-primary { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    .ac-cookie-banner, .ac-cookie-modal, .ac-cookie-modal-box { transition: none; }
}
