/* ==========================================================================
   LSC Bimbo - Banner & Gestor de Consentimento de Cookies (RGPD / GDPR)
   Design Integrado: Dark Navy (#07192f) & Ouro/Amarelo (#ffcc00)
   ========================================================================== */

/* 1. Contentor Principal do Banner (Fixo no Rodapé com Z-Index Absoluto) */
.lsc-cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 2147483646 !important;
    background: #07192f !important;
    background: linear-gradient(180deg, #092140 0%, #07192f 100%) !important;
    border-top: 2px solid #ffcc00 !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.65) !important;
    color: #f8fafc !important;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
    padding: 1.15rem 1rem !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* Ocultação Eficaz e Instantânea após Consentimento */
html.lsc-consent-saved .lsc-cookie-banner,
.lsc-cookie-banner.lsc-cookie-hidden {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transform: translateY(120%) !important;
}

.lsc-cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: auto !important;
}

@media (min-width: 992px) {
    .lsc-cookie-banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
}

.lsc-cookie-content {
    flex: 1;
}

.lsc-cookie-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.35rem;
}

.lsc-cookie-badge {
    background-color: #ffcc00 !important;
    color: #07192f !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    padding: 0.2rem 0.55rem !important;
    border-radius: 999px !important;
    letter-spacing: 0.05em !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

.lsc-cookie-title {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
}

.lsc-cookie-text {
    font-size: 0.88rem !important;
    line-height: 1.45 !important;
    color: #cbd5e1 !important;
    margin: 0 !important;
}

.lsc-cookie-text a {
    color: #ffcc00 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s !important;
}

.lsc-cookie-text a:hover {
    color: #ffffff !important;
}

/* 2. Botões de Ação do Banner */
.lsc-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
}

@media (max-width: 576px) {
    .lsc-cookie-actions {
        width: 100%;
    }
    .lsc-cookie-btn {
        flex: 1 1 100%;
        text-align: center;
        justify-content: center;
    }
}

.lsc-cookie-btn {
    border: none !important;
    outline: none !important;
    font-family: inherit !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    padding: 0.6rem 1.15rem !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
    user-select: none !important;
}

.lsc-cookie-btn-accept {
    background-color: #ffcc00 !important;
    color: #07192f !important;
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.25) !important;
}

.lsc-cookie-btn-accept:hover,
.lsc-cookie-btn-accept:active {
    background-color: #e6b800 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.35) !important;
}

.lsc-cookie-btn-reject {
    background-color: transparent !important;
    color: #f1f5f9 !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.lsc-cookie-btn-reject:hover,
.lsc-cookie-btn-reject:active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

.lsc-cookie-btn-config {
    background-color: transparent !important;
    color: #cbd5e1 !important;
    border: 1px dashed rgba(255, 255, 255, 0.3) !important;
}

.lsc-cookie-btn-config:hover,
.lsc-cookie-btn-config:active {
    color: #ffcc00 !important;
    border-color: #ffcc00 !important;
    background-color: rgba(255, 204, 0, 0.08) !important;
}

/* 3. Modal de Configuração Avançada de Cookies */
/* CRÍTICO: display: none quando fechado para NUNCA bloquear cliques nos botões do banner! */
.lsc-cookie-modal-backdrop {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(4, 15, 28, 0.82) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    z-index: 2147483647 !important;
    opacity: 0;
    pointer-events: none !important;
    transition: opacity 0.25s ease;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lsc-cookie-modal-backdrop.lsc-cookie-modal-open {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.lsc-cookie-modal {
    background: #092140 !important;
    border: 1.5px solid #ffcc00 !important;
    border-radius: 18px !important;
    max-width: 620px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75) !important;
    overflow: hidden;
    transform: scale(0.95) translateY(15px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: auto !important;
}

.lsc-cookie-modal-backdrop.lsc-cookie-modal-open .lsc-cookie-modal {
    transform: scale(1) translateY(0);
}

.lsc-cookie-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #07192f;
}

.lsc-cookie-modal-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lsc-cookie-modal-close {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    font-size: 1.4rem !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0.2rem !important;
    border-radius: 6px !important;
    transition: color 0.2s !important;
    touch-action: manipulation !important;
}

.lsc-cookie-modal-close:hover {
    color: #ffffff !important;
}

.lsc-cookie-modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #cbd5e1 !important;
    font-size: 0.88rem !important;
}

.lsc-cookie-category {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    padding: 1rem !important;
    transition: border-color 0.2s !important;
}

.lsc-cookie-category:hover {
    border-color: rgba(255, 204, 0, 0.3) !important;
}

.lsc-cookie-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.lsc-cookie-cat-name {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.lsc-cookie-cat-status {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 999px !important;
    text-transform: uppercase !important;
}

.lsc-cookie-cat-status.status-required {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.lsc-cookie-category p {
    margin: 0 !important;
    font-size: 0.82rem !important;
    color: #94a3b8 !important;
    line-height: 1.45 !important;
}

/* Custom Switch */
.lsc-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.lsc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lsc-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.lsc-switch input:checked + .lsc-slider {
    background-color: #ffcc00 !important;
}

.lsc-switch input:checked + .lsc-slider:before {
    transform: translateX(20px);
    background-color: #07192f;
}

.lsc-switch input:disabled + .lsc-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.lsc-cookie-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: #07192f;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* 4. Gatilho no Rodapé */
.lsc-cookie-reopen-trigger {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #94a3b8 !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0.82rem !important;
    font-family: inherit !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s !important;
}

.lsc-cookie-reopen-trigger:hover {
    color: #ffcc00 !important;
}
