/* =====================================================================
   BANNER DE COOKIES + PREFERÊNCIAS
   Mesma paleta/tipografia do site (variáveis em variaveis.css).
   ===================================================================== */

html.ck-lock { overflow: hidden; }

/* botão "Preferências de cookies" do rodapé (parece um link) */
.footer-col ul li .footer-link-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--neutro-dark-green-grey--200);
    text-align: left;
    cursor: pointer;
    transition: color .2s ease;
}
.footer-col ul li .footer-link-btn:hover,
.footer-col ul li .footer-link-btn:focus-visible {
    color: var(--primary-oliver-leaf---200);
}

/* ---------- Banner ---------- */
.ck-banner {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    border-radius: 20px;
    background: var(--primary-oliver-leaf---900);
    color: var(--primary-oliver-leaf---50);
    box-shadow: 0 12px 40px rgba(29, 33, 18, .35);
    font-family: "Google Sans Flex", sans-serif;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .5s cubic-bezier(.22,.61,.28,1), transform .5s cubic-bezier(.22,.61,.28,1);
}
.ck-banner[hidden] { display: none; }
.ck-banner.ck-visivel { opacity: 1; transform: none; }

.ck-banner__texto { flex: 1 1 auto; min-width: 0; }
.ck-banner__titulo {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 22px;
    line-height: 1.2;
    color: var(--basic-white);
    margin-bottom: 8px;
}
.ck-banner__texto p {
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--primary-oliver-leaf---100);
}
.ck-banner__texto a,
.ck-modal a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.ck-banner__texto a:hover { color: var(--primary-oliver-leaf---300); }

.ck-banner__acoes {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- Botões ---------- */
.ck-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid transparent;
    font-family: "Google Sans Flex", sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.ck-btn:focus-visible { outline: 3px solid var(--primary-oliver-leaf---300); outline-offset: 2px; }

.ck-btn--primary { background: var(--primary-oliver-leaf---50); color: var(--primary-oliver-leaf---900); }
.ck-btn--primary:hover { background: var(--basic-white); box-shadow: 0 4px 4px rgba(29, 33, 18, .25); }

.ck-btn--outline { background: transparent; color: var(--primary-oliver-leaf---50); border-color: var(--primary-oliver-leaf---300); }
.ck-btn--outline:hover { background: rgba(246, 247, 238, .1); }

.ck-btn--ghost { background: transparent; color: var(--primary-oliver-leaf---100); text-decoration: underline; text-underline-offset: 3px; padding-inline: 12px; }
.ck-btn--ghost:hover { color: var(--basic-white); }

/* ---------- Modal de preferências ---------- */
.ck-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(29, 33, 18, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.ck-overlay[hidden] { display: none; }

.ck-modal {
    width: 100%;
    max-width: 580px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 32px;
    border-radius: 20px;
    background: var(--primary-oliver-leaf---50);
    color: var(--neutro-dark-green-grey--800);
    font-family: "Google Sans Flex", sans-serif;
    box-shadow: 0 12px 40px rgba(29, 33, 18, .35);
}
.ck-modal:focus { outline: none; }
.ck-modal h2 {
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-weight: 500;
    font-size: 28px;
    line-height: 1.15;
    color: var(--primary-oliver-leaf---800);
    margin-bottom: 8px;
}
.ck-modal__intro { font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
.ck-modal a { color: var(--primary-oliver-leaf---600); }

.ck-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #e3e6da;
}
.ck-cat h3 { font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--primary-oliver-leaf---800); margin-bottom: 4px; }
.ck-cat p { font-size: 14px; line-height: 1.5; }

/* interruptor */
.ck-switch { position: relative; flex: none; width: 48px; height: 28px; margin-top: 2px; }
.ck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ck-switch input:disabled { cursor: not-allowed; }
.ck-switch span {
    position: absolute; inset: 0;
    border-radius: 28px;
    background: var(--neutro-dark-green-grey--300);
    transition: background-color .2s ease;
}
.ck-switch span::after {
    content: "";
    position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--basic-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.ck-switch input:checked + span { background: var(--primary-oliver-leaf---600); }
.ck-switch input:checked + span::after { transform: translateX(20px); }
.ck-switch input:disabled + span { opacity: .6; }
.ck-switch input:focus-visible + span { outline: 3px solid var(--primary-oliver-leaf---400); outline-offset: 2px; }

.ck-modal__acoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid #e3e6da;
}
.ck-modal .ck-btn--primary { background: var(--primary-oliver-leaf---800); color: var(--basic-white); }
.ck-modal .ck-btn--primary:hover { background: var(--primary-oliver-leaf---600); box-shadow: none; }
.ck-modal .ck-btn--outline { color: var(--primary-oliver-leaf---800); border-color: var(--primary-oliver-leaf---400); }
.ck-modal .ck-btn--outline:hover { background: var(--primary-oliver-leaf---100); }

/* ---------- Mobile ---------- */
@media (max-width: 767.98px) {
    .ck-banner { left: 12px; right: 12px; bottom: 12px; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
    .ck-banner__acoes { flex-direction: column-reverse; }
    .ck-banner__acoes .ck-btn { width: 100%; }
    .ck-modal { padding: 24px 20px; }
    .ck-modal__acoes { flex-direction: column-reverse; }
    .ck-modal__acoes .ck-btn { width: 100%; }
}

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