/* ==========================================================================
   Consentimento de cookies (LGPD)
   Arquivo separado — não alterar style.css principal.
   ========================================================================== */

/* Banner fixo no rodapé ---------------------------------------------------- */
.baw-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: #1c1c1c;
    color: #f2f2f2;
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.28);
    border-top: 3px solid #ff9523;
    font-family: 'Manrope', 'Monda', sans-serif;
}

.baw-cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.baw-cookie-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 22px;
    color: #e9e9e9;
    flex: 1 1 420px;
    min-width: 260px;
}

.baw-cookie-banner__link {
    color: #ff9523;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.baw-cookie-banner__link:hover {
    color: #ffb14f;
}

/* Ações — três botões com o mesmo peso visual ------------------------------ */
.baw-cookie-banner__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.baw-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    min-width: 140px;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 250ms ease;
    text-align: center;
    font-family: inherit;
}

.baw-cookie-btn:focus-visible {
    outline: 2px solid #ffb14f;
    outline-offset: 2px;
}

/* Recusar / Opções avançadas: outlined, borda visível, mesmo tamanho */
.baw-cookie-btn--outline {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.baw-cookie-btn--outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    color: #ffffff;
}

/* Outline para fundo claro (página de preferências) */
.baw-cookie-btn--outline-dark {
    background: transparent;
    color: #1c1c1c;
    border-color: #1c1c1c;
}

.baw-cookie-btn--outline-dark:hover {
    background: rgba(28, 28, 28, 0.08);
    border-color: #1c1c1c;
    color: #1c1c1c;
}

/* Aceitar todos: destaque primary */
.baw-cookie-btn--primary {
    background: #ff9523;
    color: #1c1c1c;
    border-color: #ff9523;
}

.baw-cookie-btn--primary:hover {
    background: #ffb14f;
    border-color: #ffb14f;
    color: #1c1c1c;
}

/* Responsivo --------------------------------------------------------------- */
@media (max-width: 768px) {
    .baw-cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        gap: 14px;
    }

    .baw-cookie-banner__actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    .baw-cookie-btn {
        width: 100%;
        min-width: 0;
    }
}

/* ==========================================================================
   Bloco "Gerenciar preferências" na página de Política de Cookies
   ========================================================================== */
.baw-legal-page--cookie-actions {
    padding-top: 0;
    border-top: none;
}

.baw-cookie-manage {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.baw-cookie-manage__text {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #6b6866;
}

@media (max-width: 768px) {
    .baw-cookie-manage {
        align-items: stretch;
    }

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

/* ==========================================================================
   Modal de preferências (aberto pelo botão "Opções avançadas")
   ========================================================================== */
.baw-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
}

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

.baw-cookie-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.baw-cookie-modal__dialog {
    position: relative;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Manrope', 'Monda', sans-serif;
    animation: bawCookieModalIn 200ms ease;
}

@keyframes bawCookieModalIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.baw-cookie-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid #ececec;
}

.baw-cookie-modal__title {
    margin: 0;
    font-size: 20px;
    line-height: 28px;
    color: #1c1c1c;
}

.baw-cookie-modal__close {
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 4px;
    transition: color 200ms ease;
}

.baw-cookie-modal__close:hover {
    color: #1c1c1c;
}

.baw-cookie-modal__body {
    padding: 20px 24px;
    overflow-y: auto;
}

.baw-cookie-modal__intro {
    font-size: 14px;
    line-height: 22px;
    color: #555;
    margin: 0 0 18px;
}

.baw-cookie-modal__intro a {
    color: #ff9523;
    font-weight: 700;
    text-decoration: underline;
}

.baw-cookie-cat {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #ececec;
}

.baw-cookie-cat:last-child {
    border-bottom: none;
}

.baw-cookie-cat__info {
    flex: 1 1 auto;
    min-width: 0;
}

.baw-cookie-cat__title {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1c;
    margin: 0 0 4px;
}

.baw-cookie-cat__desc {
    font-size: 13px;
    line-height: 20px;
    color: #666;
    margin: 0;
}

.baw-cookie-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid #ececec;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .baw-cookie-modal__dialog {
        margin: 16px auto;
        max-height: calc(100vh - 32px);
    }

    .baw-cookie-modal__footer {
        flex-direction: column-reverse;
    }

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

/* ==========================================================================
   Página de preferências de cookies
   ========================================================================== */
.baw-cookie-prefs {
    max-width: 920px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.baw-cookie-prefs__intro {
    font-size: 16px;
    line-height: 26px;
    color: #555;
    margin-bottom: 28px;
}

.baw-cookie-prefs__section {
    margin-bottom: 34px;
}

.baw-cookie-prefs__section h2 {
    font-size: 22px;
    line-height: 30px;
    margin-bottom: 14px;
    color: #1c1c1c;
}

/* Tabela de cookies essenciais */
.baw-cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e3e3e3;
}

.baw-cookie-table th,
.baw-cookie-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.baw-cookie-table th {
    background: #f6f6f6;
    color: #1c1c1c;
    font-weight: 700;
}

.baw-cookie-table tr:last-child td {
    border-bottom: none;
}

/* Cards de categorias não essenciais */
.baw-cookie-card {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
}

.baw-cookie-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.baw-cookie-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #1c1c1c;
    margin: 0 0 6px;
}

.baw-cookie-card__desc {
    font-size: 14px;
    line-height: 22px;
    color: #666;
    margin: 0;
}

.baw-cookie-card__cookies {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: #888;
}

.baw-cookie-card__cookies li {
    display: inline-block;
    background: #f2f2f2;
    border-radius: 4px;
    padding: 3px 8px;
    margin: 4px 6px 0 0;
}

/* Switch (toggle) */
.baw-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex: 0 0 auto;
}

.baw-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.baw-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #c9c9c9;
    border-radius: 28px;
    transition: background 250ms ease;
}

.baw-switch__slider::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 250ms ease;
}

.baw-switch input:checked + .baw-switch__slider {
    background: #ff9523;
}

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

.baw-switch input:focus-visible + .baw-switch__slider {
    outline: 2px solid #ffb14f;
    outline-offset: 2px;
}

/* Essencial sempre ligado (desabilitado) */
.baw-switch--locked .baw-switch__slider {
    background: #ff9523;
    cursor: not-allowed;
    opacity: 0.7;
}

.baw-switch--locked .baw-switch__slider::before {
    transform: translateX(24px);
}

/* Ações da página de preferências */
.baw-cookie-prefs__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.baw-cookie-prefs__feedback {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 700;
    color: #1f7a3d;
    display: none;
}

.baw-cookie-prefs__feedback.is-visible {
    display: block;
}

@media (max-width: 768px) {
    .baw-cookie-card__head {
        flex-direction: row;
    }

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