/* =====================================================================
   ArchTec — LGPD Consent Banner & Modal
   Banner de consentimento de cookies em conformidade com a LGPD
   e Google Consent Mode v2.
   ===================================================================== */

.lgpd-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(5, 14, 26, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    padding: 20px 24px;
    transform: translateY(100%);
    transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #e2e8f0;
}

.lgpd-banner.is-visible {
    transform: translateY(0);
}

.lgpd-banner__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.lgpd-banner__content {
    flex: 1 1 480px;
    min-width: 0;
}

.lgpd-banner__title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lgpd-banner__title::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C3AED' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5'/><path d='M8.5 8.5v.01'/><path d='M16 15.5v.01'/><path d='M12 12v.01'/><path d='M11 17v.01'/><path d='M7 14v.01'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
}

.lgpd-banner__text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

.lgpd-banner__text a {
    color: #8B5CF6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lgpd-banner__text a:hover {
    color: #a78bfa;
}

.lgpd-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.lgpd-btn {
    appearance: none;
    border: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 150ms cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
}

.lgpd-btn--primary {
    background: #7C3AED;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(124, 58, 237, 0.4);
}

.lgpd-btn--primary:hover {
    background: #8B5CF6;
    transform: translateY(-1px);
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.6);
}

.lgpd-btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.lgpd-btn--secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.lgpd-btn--ghost {
    background: transparent;
    color: #94a3b8;
}

.lgpd-btn--ghost:hover {
    color: #e2e8f0;
}

@media (max-width: 720px) {
    .lgpd-banner {
        padding: 16px;
    }
    .lgpd-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .lgpd-banner__actions {
        justify-content: stretch;
    }
    .lgpd-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* ============================ Modal ============================ */

.lgpd-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3, 0, 20, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-family: 'Inter', system-ui, sans-serif;
    color: #e2e8f0;
}

.lgpd-modal.is-visible {
    display: flex;
    animation: lgpd-fade-in 200ms ease-out;
}

@keyframes lgpd-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lgpd-modal__dialog {
    background: #050E1A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.lgpd-modal__header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lgpd-modal__title {
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.lgpd-modal__subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.lgpd-modal__body {
    padding: 16px 24px;
}

.lgpd-category {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lgpd-category:last-child {
    border-bottom: none;
}

.lgpd-category__info {
    flex: 1;
    min-width: 0;
}

.lgpd-category__name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

.lgpd-category__desc {
    font-size: 0.8125rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

.lgpd-category__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 9999px;
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
    margin-top: 6px;
}

/* Toggle switch */
.lgpd-toggle {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.lgpd-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.lgpd-toggle__slider {
    display: block;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    cursor: pointer;
    transition: background 200ms ease;
    position: relative;
}

.lgpd-toggle__slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 200ms ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.lgpd-toggle input:checked + .lgpd-toggle__slider {
    background: #7C3AED;
}

.lgpd-toggle input:checked + .lgpd-toggle__slider::after {
    transform: translateX(20px);
}

.lgpd-toggle input:disabled + .lgpd-toggle__slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.lgpd-modal__footer {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .lgpd-modal__footer {
        flex-direction: column-reverse;
    }
    .lgpd-modal__footer .lgpd-btn {
        width: 100%;
    }
}

/* ============================ Reabrir preferencias (footer link) ============================ */
.lgpd-reopen {
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lgpd-reopen:hover {
    color: #8B5CF6;
}

/* ============================ Checkbox de consentimento em formularios ============================ */
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 4px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #94a3b8;
}

.form-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #7C3AED;
    cursor: pointer;
}

.form-consent label {
    cursor: pointer;
    margin: 0;
    font-weight: 400;
}

.form-consent a {
    color: #8B5CF6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.form-consent a:hover {
    color: #a78bfa;
}
