/* =============================================================================
   JR Solutions — lgpd.css
   Banner de consentimento de cookies, placeholder do Google Maps,
   botão flutuante de preferências, ajustes finos mobile.
   ============================================================================= */

/* ---------- Cookie Consent Banner ---------- */
.lgpd-banner {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9998;
    background: rgba(8, 11, 17, .92);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 -16px 40px rgba(0,0,0,.45);
    transform: translateY(120%);
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
    color: #e5e7eb;
    font-family: var(--font-body, system-ui, sans-serif);
}
.lgpd-banner.is-visible { transform: translateY(0); }

.lgpd-banner-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
}
.lgpd-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-red, #da1818), var(--primary-blue, #2563eb));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(218,24,24,.35);
    flex-shrink: 0;
}
.lgpd-text {
    line-height: 1.55;
    font-size: 14px;
}
.lgpd-text strong {
    display: block;
    color: #fff;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}
.lgpd-text a {
    color: var(--primary-blue, #2563eb);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.lgpd-text a:hover { color: #5b8def; }
.lgpd-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}
.lgpd-btn {
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.04);
    color: #fff;
    padding: 11px 18px;
    border-radius: 10px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .05em;
    cursor: pointer;
    transition: all .25s ease;
    white-space: nowrap;
}
.lgpd-btn:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.30);
    transform: translateY(-1px);
}
.lgpd-btn.primary {
    background: linear-gradient(135deg, var(--primary-red, #da1818), #b81515);
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(218,24,24,.35);
}
.lgpd-btn.primary:hover {
    box-shadow: 0 6px 22px rgba(218,24,24,.5);
}
.lgpd-btn.secondary { border-color: rgba(37,99,235,.5); color: #93c5fd; }
.lgpd-btn.secondary:hover { background: rgba(37,99,235,.15); }

/* Detalhes expansíveis */
.lgpd-details {
    grid-column: 1 / -1;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s ease, opacity .35s ease, margin .35s ease;
    margin-top: 0;
}
.lgpd-details.is-open {
    max-height: 320px;
    opacity: 1;
    margin-top: 14px;
}
.lgpd-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.lgpd-cat {
    background: rgba(17,25,39,.6);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.lgpd-cat strong {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    color: #fff;
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}
.lgpd-cat small {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}
.lgpd-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255,255,255,.1);
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s;
}
.lgpd-toggle::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .25s, background .25s;
}
.lgpd-toggle.is-on {
    background: linear-gradient(135deg, var(--primary-red, #da1818), var(--primary-blue, #2563eb));
}
.lgpd-toggle.is-on::after { transform: translateX(20px); }
.lgpd-toggle.is-locked {
    cursor: not-allowed;
    background: rgba(16,185,129,.4);
    opacity: .7;
}
.lgpd-toggle.is-locked::after { transform: translateX(20px); }

@media (max-width: 820px) {
    .lgpd-banner-inner {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 18px 0;
    }
    .lgpd-icon { width: 40px; height: 40px; font-size: 18px; }
    .lgpd-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    .lgpd-actions .lgpd-btn { width: 100%; padding: 12px 8px; font-size: 12px; }
    .lgpd-categories { grid-template-columns: 1fr; }
}

/* ---------- Botão flutuante de Preferências de Privacidade ---------- */
.lgpd-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9990;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(8,11,17,.85);
    border: 1px solid rgba(255,255,255,.12);
    color: #93c5fd;
    display: grid;
    place-items: center;
    font-size: 16px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all .3s ease;
    opacity: .65;
}
.lgpd-fab:hover {
    opacity: 1;
    transform: scale(1.08);
    background: rgba(37,99,235,.2);
    color: #fff;
}
.lgpd-fab.is-hidden { display: none; }

/* ---------- Placeholder do Google Maps (carregamento condicional) ---------- */
.map-consent-placeholder {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: var(--border-radius-lg, 16px);
    background:
        linear-gradient(135deg, rgba(218,24,24,.05), rgba(37,99,235,.08)),
        repeating-linear-gradient(0deg,
            rgba(255,255,255,.04) 0,
            rgba(255,255,255,.04) 1px,
            transparent 1px,
            transparent 40px),
        repeating-linear-gradient(90deg,
            rgba(255,255,255,.04) 0,
            rgba(255,255,255,.04) 1px,
            transparent 1px,
            transparent 40px),
        #0f1722;
    border: 1px solid rgba(255,255,255,.08);
    display: grid;
    place-items: center;
    padding: 30px;
    text-align: center;
    overflow: hidden;
}
.map-consent-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(37,99,235,.18), transparent 60%);
    pointer-events: none;
}
.map-consent-inner {
    max-width: 460px;
    position: relative;
    z-index: 1;
}
.map-consent-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(37,99,235,.15);
    border: 1px solid rgba(37,99,235,.4);
    display: grid;
    place-items: center;
    color: var(--primary-blue, #2563eb);
    font-size: 28px;
}
.map-consent-placeholder h4 {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 700;
}
.map-consent-placeholder p {
    color: var(--text-slate, #94a3b8);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}
.map-consent-placeholder p strong { color: #fff; }
.map-consent-btn {
    background: linear-gradient(135deg, var(--primary-blue, #2563eb), #1e40af);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .25s ease;
}
.map-consent-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,99,235,.4);
}

/* ---------- Checkbox de consentimento no formulário ---------- */
.lgpd-consent-field {
    margin: 16px 0 6px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-slate, #94a3b8);
}
.lgpd-consent-field input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-red, #da1818);
    cursor: pointer;
    flex-shrink: 0;
}
.lgpd-consent-field label {
    cursor: pointer;
}
.lgpd-consent-field a {
    color: var(--primary-blue, #2563eb);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.lgpd-consent-field a:hover { color: #5b8def; }
.lgpd-consent-field.is-required-error label { color: #ff7b72; }

/* ---------- Footer privacy links ---------- */
.footer-legal-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 14px;
    font-size: 12px;
}
.footer-legal-links a,
.footer-legal-links button {
    color: var(--text-slate, #94a3b8);
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    padding: 4px 0;
    transition: color .2s;
    font-family: inherit;
}
.footer-legal-links a:hover,
.footer-legal-links button:hover {
    color: #fff;
}
.footer-legal-links a + a::before,
.footer-legal-links button + a::before,
.footer-legal-links a + button::before {
    content: "•";
    margin-right: 18px;
    color: var(--text-muted, #64748b);
}

/* ---------- Mobile responsive fine-tuning ---------- */
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .stat-item { padding: 20px 12px !important; }
    .stat-number { font-size: 28px !important; }
    .stat-label { font-size: 10px !important; letter-spacing: .1em !important; }
    .tech-marquee-item { font-size: 12px !important; gap: 8px !important; }
    .tech-marquee-track { gap: 36px !important; }
    .hero h1 { font-size: clamp(28px, 8vw, 36px) !important; }
    .agent-img-frame > .corner { width: 14px; height: 14px; }
    .agent-status { font-size: 9px; padding: 3px 7px; top: 10px; right: 10px; }
    .map-consent-placeholder { height: 280px; padding: 22px 18px; }
    .map-consent-placeholder h4 { font-size: 16px; }
    .map-consent-placeholder p { font-size: 12px; }
}

@media (max-width: 360px) {
    .lgpd-banner-inner { padding: 14px 0; }
    .lgpd-text { font-size: 12px; }
    .lgpd-text strong { font-size: 14px; }
    .stat-number { font-size: 24px !important; }
}

/* Acessibilidade: tap targets mínimos 44px em mobile */
@media (max-width: 768px) {
    .lgpd-btn, .map-consent-btn { min-height: 44px; }
    .footer-legal-links a, .footer-legal-links button { min-height: 32px; display: flex; align-items: center; }
}
