/* ==========================================================================
   PERSONAL CAR SILVA - SUÍTE DE CONFORMIDADE LGPD (COOKIES & PRIVACIDADE)
   Design Premium Dark Glassmorphism | Lei nº 13.709/2018
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. BANNER PRINCIPAL DE CONSENTIMENTO (FLUTUANTE NA BASE)
   -------------------------------------------------------------------------- */
.lgpd-banner {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 1180px;
    margin: 0 auto;
    z-index: 99999;
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(252, 127, 44, 0.35);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 25px rgba(252, 127, 44, 0.15);
    padding: 22px 28px;
    display: none; /* Controlado via JS */
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e2e2e8;
    box-sizing: border-box;
    animation: lgpdFadeSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lgpdFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lgpd-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.lgpd-banner-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: rgba(252, 127, 44, 0.12);
    border: 1px solid rgba(252, 127, 44, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FC7F2C;
    font-size: 20px;
}

.lgpd-banner-text {
    font-size: 13.5px;
    line-height: 1.55;
    color: #cfd0d8;
    margin: 0;
}

.lgpd-banner-title {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.lgpd-banner-text strong {
    color: #ffffff;
}

.lgpd-link {
    color: #FC7F2C;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    display: inline;
}

.lgpd-link:hover, .lgpd-link:focus {
    color: #ffa15d;
    text-decoration: underline;
}

/* Ações do Banner */
.lgpd-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.lgpd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    outline: none;
    text-decoration: none;
    box-sizing: border-box;
}

/* Botão Aceitar Todos (Destaque Principal) */
.lgpd-btn-primary {
    background: linear-gradient(135deg, #FC7F2C 0%, #e06210 100%);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(252, 127, 44, 0.35);
}

.lgpd-btn-primary:hover {
    background: linear-gradient(135deg, #ff8e43 0%, #ed6d17 100%);
    box-shadow: 0 6px 20px rgba(252, 127, 44, 0.5);
    transform: translateY(-1px);
}

/* Botão Apenas Essenciais (Secundário) */
.lgpd-btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: #d8d8e2 !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.lgpd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Botão Personalizar (Terceiro / Outline) */
.lgpd-btn-outline {
    background: transparent;
    color: #FC7F2C !important;
    border: 1px solid rgba(252, 127, 44, 0.4);
}

.lgpd-btn-outline:hover {
    background: rgba(252, 127, 44, 0.1);
    border-color: #FC7F2C;
    color: #ffa15d !important;
}

/* --------------------------------------------------------------------------
   2. ESTRUTURA DOS MODAIS (PREFERÊNCIAS & POLÍTICA DE PRIVACIDADE)
   -------------------------------------------------------------------------- */
.lgpd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lgpd-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.lgpd-modal-container {
    background: #15151a;
    border: 1px solid rgba(252, 127, 44, 0.35);
    border-radius: 18px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(252, 127, 44, 0.12);
    overflow: hidden;
    transform: scale(0.95) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.lgpd-modal-overlay.active .lgpd-modal-container {
    transform: scale(1) translateY(0);
}

.lgpd-modal-container.lgpd-modal-large {
    max-width: 840px;
}

/* Cabeçalho do Modal */
.lgpd-modal-header {
    padding: 20px 24px;
    background: linear-gradient(180deg, rgba(28, 28, 35, 0.95) 0%, rgba(21, 21, 26, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.lgpd-modal-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lgpd-modal-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(252, 127, 44, 0.14);
    border: 1px solid rgba(252, 127, 44, 0.3);
    color: #FC7F2C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.lgpd-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.3px;
}

.lgpd-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0b0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.lgpd-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

/* Corpo do Modal com Scroll */
.lgpd-modal-body {
    padding: 24px;
    overflow-y: auto;
    color: #cfd0d8;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    overscroll-behavior: contain;
}

/* Custom Scrollbar */
.lgpd-modal-body::-webkit-scrollbar {
    width: 6px;
}
.lgpd-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.lgpd-modal-body::-webkit-scrollbar-thumb {
    background: rgba(252, 127, 44, 0.35);
    border-radius: 3px;
}
.lgpd-modal-body::-webkit-scrollbar-thumb:hover {
    background: #FC7F2C;
}

.lgpd-modal-intro {
    font-size: 13.5px;
    color: #a6a7b3;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------------------------------
   3. CARDS DE CATEGORIAS DE COOKIES & TOGGLES MODERNOS
   -------------------------------------------------------------------------- */
.lgpd-cookie-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.lgpd-cookie-category:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(252, 127, 44, 0.25);
}

.lgpd-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.lgpd-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lgpd-category-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.lgpd-category-badge {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(252, 127, 44, 0.15);
    color: #FC7F2C;
    border: 1px solid rgba(252, 127, 44, 0.3);
}

.lgpd-category-badge.always-active {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.lgpd-category-desc {
    font-size: 13px;
    color: #b0b1bd;
    margin: 0;
    line-height: 1.5;
}

/* Switches / Toggles Estilizados */
.lgpd-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

input:checked + .lgpd-slider {
    background-color: #FC7F2C;
    border-color: #FC7F2C;
}

input:checked + .lgpd-slider:before {
    transform: translateX(22px);
}

input:disabled + .lgpd-slider {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: #28a745;
    border-color: #28a745;
}

/* Rodapé do Modal */
.lgpd-modal-footer {
    padding: 16px 24px;
    background: rgba(18, 18, 22, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   4. CONTEÚDO ESPECÍFICO DA POLÍTICA DE PRIVACIDADE
   -------------------------------------------------------------------------- */
.lgpd-policy-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0 8px 0;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lgpd-policy-content h3 i {
    color: #FC7F2C;
    font-size: 14px;
}

.lgpd-policy-content p {
    font-size: 13.5px;
    line-height: 1.65;
    color: #c0c1cc;
    margin-bottom: 12px;
}

.lgpd-policy-content ul {
    margin: 8px 0 16px 20px;
    padding: 0;
}

.lgpd-policy-content li {
    font-size: 13.5px;
    line-height: 1.6;
    color: #c0c1cc;
    margin-bottom: 6px;
    list-style: disc;
}

.lgpd-policy-highlight {
    background: rgba(252, 127, 44, 0.08);
    border-left: 3px solid #FC7F2C;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

.lgpd-policy-highlight p {
    margin: 0;
    font-weight: 500;
    color: #e5e5eb;
}

/* --------------------------------------------------------------------------
   5. BADGE FLUTUANTE DE REABERTURA (DIREITO DE REVOGAÇÃO - ART. 8º § 5º)
   -------------------------------------------------------------------------- */
.lgpd-floating-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9990;
    background: rgba(20, 20, 24, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(252, 127, 44, 0.4);
    border-radius: 30px;
    padding: 8px 14px;
    color: #e5e5eb;
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    outline: none;
}

.lgpd-floating-badge i {
    color: #FC7F2C;
    font-size: 13px;
}

.lgpd-floating-badge:hover {
    background: #FC7F2C;
    color: #ffffff;
    border-color: #FC7F2C;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(252, 127, 44, 0.4);
}

.lgpd-floating-badge:hover i {
    color: #ffffff;
}

/* Link de Rodapé */
.lgpd-footer-link {
    color: #a0a0b0;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 4px 8px;
}

.lgpd-footer-link:hover {
    color: #FC7F2C;
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   6. RESPONSIVIDADE & MOBILE
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .lgpd-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 20px;
        gap: 16px;
    }

    .lgpd-banner-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .lgpd-btn {
        flex: 1;
        min-width: 140px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .lgpd-banner {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 16px;
        border-radius: 14px;
    }

    .lgpd-banner-content {
        gap: 12px;
    }

    .lgpd-banner-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
    }

    .lgpd-banner-title {
        font-size: 15px;
    }

    .lgpd-banner-text {
        font-size: 12.5px;
    }

    .lgpd-banner-actions {
        flex-direction: column;
        gap: 8px;
    }

    .lgpd-btn {
        width: 100%;
    }

    .lgpd-modal-overlay {
        padding: 10px;
    }

    .lgpd-modal-container {
        max-height: 92vh;
        border-radius: 14px;
    }

    .lgpd-modal-header {
        padding: 16px;
    }

    .lgpd-modal-title {
        font-size: 16px;
    }

    .lgpd-modal-body {
        padding: 16px;
    }

    .lgpd-modal-footer {
        padding: 12px 16px;
        flex-direction: column;
    }

    .lgpd-modal-footer .lgpd-btn {
        width: 100%;
    }

    .lgpd-floating-badge span {
        display: none; /* Em mobile, exibe apenas o ícone redondo */
    }

    .lgpd-floating-badge {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        bottom: 15px;
        left: 15px;
    }
}