/* =========================================================
   Perfect Solution - Consentimento de Cookies
   ========================================================= */

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.cookie-consent[hidden],
.cookie-modal[hidden] {
    display: none !important;
}

.cookie-consent {
    position: fixed;
    z-index: 9998;
    left: 20px;
    right: 20px;
    bottom: 20px;
    max-width: 1180px;
    margin: 0 auto;
    font-family: "Poppins", sans-serif;
}

.cookie-consent__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(25, 35, 52, 0.98);
    color: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.cookie-consent__content {
    min-width: 0;
}

.cookie-consent__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.84;
}

.cookie-consent__title {
    display: block;
    margin-bottom: 7px;
    font-family: "Fraunces", serif;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.25;
}

.cookie-consent__content p {
    max-width: 760px;
    margin: 0 0 7px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-consent__policy-link {
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-consent__actions,
.cookie-modal__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent__actions {
    justify-content: flex-end;
}

.cookie-btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn:focus-visible,
.cookie-modal__close:focus-visible,
.cookie-switch input:focus-visible + .cookie-switch__slider,
.footer-cookie-link:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

.cookie-btn--primary {
    background: #ffffff;
    color: #192334;
}

.cookie-btn--secondary {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.cookie-btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.42);
    color: #fff;
}

/* Modal */
.cookie-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    font-family: "Poppins", sans-serif;
}

.cookie-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 18, 0.72);
    backdrop-filter: blur(5px);
}

.cookie-modal__panel {
    position: relative;
    z-index: 1;
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow-y: auto;
    padding: 28px;
    border-radius: 20px;
    background: #192334;
    color: #fff;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.38);
}

.cookie-modal__header {
    padding-right: 44px;
    margin-bottom: 20px;
}

.cookie-modal__header h2 {
    margin: 0 0 8px;
    color: #fff;
    font-family: "Fraunces", serif;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.cookie-modal__header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
}

.cookie-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.cookie-category {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-category__text strong {
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.cookie-category__text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.88rem;
    line-height: 1.55;
}

.cookie-category__locked {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.70);
    font-size: 0.8rem;
    font-weight: 700;
}

.cookie-switch {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 30px;
    flex: 0 0 auto;
}

.cookie-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cookie-switch__slider {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    cursor: pointer;
    transition: 0.2s ease;
}

.cookie-switch__slider::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: #2e9d61;
    border-color: #2e9d61;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
    transform: translateX(22px);
}

.cookie-modal__actions {
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cookie-modal-open {
    overflow: hidden;
}

/* Link de preferências no rodapé */
.footer__privacy-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px 18px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer__privacy-links a,
.footer-cookie-link {
    color: inherit;
    opacity: 0.8;
    font: inherit;
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-cookie-link {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.footer__privacy-links a:hover,
.footer-cookie-link:hover {
    opacity: 1;
}

@media (max-width: 860px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .cookie-consent__inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    .cookie-consent__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .cookie-consent__actions .cookie-btn--primary {
        grid-column: 1 / -1;
    }

    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .cookie-consent__actions {
        grid-template-columns: 1fr;
    }

    .cookie-consent__actions .cookie-btn--primary {
        grid-column: auto;
    }

    .cookie-modal {
        padding: 10px;
        align-items: end;
    }

    .cookie-modal__panel {
        max-height: calc(100vh - 20px);
        padding: 22px 18px 18px;
        border-radius: 18px 18px 12px 12px;
    }

    .cookie-category {
        gap: 12px;
    }

    .cookie-modal__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-btn,
    .cookie-switch__slider,
    .cookie-switch__slider::before {
        transition: none;
    }
}


/* Botão de preferências usado dentro da Política de Privacidade */
.legal-inline-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.legal-inline-button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}