/* =============================================
   AGE VERIFICATION MODAL — GPHub
   ECA (Lei 8.069/90) | LGPD | Cookies
   ============================================= */

/* ── Overlay ── */
#ageVerifyOverlay {
    position: fixed;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: 'Poppins', sans-serif;
    margin: 0 !important;
    overflow-y: auto;
}

/* Garante que navbar e banner ficam abaixo do overlay */
body:has(#ageVerifyOverlay) #navbar,
body:has(#ageVerifyOverlay) .site-aviso-banner,
body:has(#ageVerifyOverlay) .site-aviso-spacer {
    z-index: 1 !important;
}

/* Body sem scroll quando overlay ativo */
body:has(#ageVerifyOverlay) {
    overflow: hidden !important;
}

/* ── Card principal ── */
#ageVerifyCard {
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: linear-gradient(160deg, #0d0d1a 0%, #111122 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(212, 175, 55, 0.06);
    animation: ageCardIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    /* scroll interno quando necessário */
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,175,55,.3) transparent;
}

@keyframes ageCardIn {
    from { opacity: 0; transform: scale(0.88) translateY(24px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── Header ── */
#ageVerifyCard .av-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    padding: 12px 20px 10px;
    text-align: center;
    position: relative;
}

#ageVerifyCard .av-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, #f5d76e, #d4af37, transparent);
}

.av-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #f1f5f9;
    margin-bottom: 4px;
    line-height: 1;
}

.av-logo span { color: #d4af37; }

.av-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

/* ── Body ── */
#ageVerifyCard .av-body {
    padding: 14px 20px 16px;
}

.av-icon-wrap {
    text-align: center;
    margin-bottom: 8px;
}

.av-icon-wrap .av-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.05));
    border: 2px solid rgba(212, 175, 55, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #d4af37;
}

.av-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f1f5f9;
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.3;
}

.av-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}

/* ── Formulário ── */
.av-form-group {
    margin-bottom: 10px;
}

.av-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 5px;
}

.av-label i {
    color: #d4af37;
    margin-right: 5px;
    font-size: 0.7rem;
}

.av-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f1f5f9;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    padding: 9px 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.av-input:focus {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(212, 175, 55, 0.04);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.08);
}

.av-input.av-input-error {
    border-color: rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.04);
}

.av-input.av-input-success {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.04);
}

/* Placeholder */
.av-input::placeholder { color: rgba(255, 255, 255, 0.2); }

/* ── Mensagem de erro/sucesso inline ── */
.av-field-msg {
    font-size: 0.72rem;
    margin-top: 5px;
    padding: 0 4px;
    min-height: 16px;
    display: block;
    transition: opacity 0.2s;
}

.av-field-msg.error  { color: #f87171; }
.av-field-msg.success { color: #4ade80; }

/* ── Aviso de privacidade ── */
.av-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 8px;
    padding: 7px 10px;
    margin-bottom: 10px;
}

.av-privacy-note i {
    color: #4ade80;
    font-size: 0.78rem;
    margin-top: 1px;
    flex-shrink: 0;
}

.av-privacy-note p {
    margin: 0;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}

.av-privacy-note strong {
    color: #4ade80;
    font-weight: 600;
}

/* ── Botões ── */
.av-btn-primary {
    width: 100%;
    padding: 11px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5d76e 0%, #d4af37 50%, #b8860b 100%);
    color: #0a0a14;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.av-btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: avBtnShimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes avBtnShimmer {
    0%   { left: -100%; }
    60%  { left: 160%; }
    100% { left: 160%; }
}

.av-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.45);
}

.av-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.av-btn-secondary {
    width: 100%;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.av-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ── Estado de sucesso ── */
#ageVerifyCard .av-success {
    text-align: center;
    padding: 10px 0 6px;
    animation: avSuccessIn 0.4s ease both;
}

@keyframes avSuccessIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.av-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.08));
    border: 2px solid rgba(34, 197, 94, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #4ade80;
    margin-bottom: 10px;
    animation: avSuccessPulse 1.5s ease-in-out infinite;
}

@keyframes avSuccessPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3); }
    50%       { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
}

.av-success-title {
    font-size: 1rem;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 4px;
}

.av-success-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
    line-height: 1.5;
}

/* ── Footer do card ── */
#ageVerifyCard .av-footer {
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 20px;
    text-align: center;
}

.av-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.av-footer-links a {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.2s;
}

.av-footer-links a:hover { color: #d4af37; }

.av-footer-links span {
    color: rgba(255, 255, 255, 0.15);
    font-size: 0.6rem;
}

/* ── Responsivo ── */
@media (max-width: 520px) {
    #ageVerifyCard {
        max-width: 100%;
        border-radius: 14px;
    }
    #ageVerifyCard .av-header,
    #ageVerifyCard .av-body {
        padding-left: 14px;
        padding-right: 14px;
    }
    #ageVerifyCard .av-footer {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-height: 600px) {
    .av-icon-wrap { display: none; }
    #ageVerifyCard .av-body { padding-top: 10px; }
}


/* =============================================
   COOKIE CONSENT BANNER — LGPD
   ============================================= */

#cookieConsent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    background: linear-gradient(135deg, #0d0d1a 0%, #111122 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    padding: 18px 24px;
    font-family: 'Poppins', sans-serif;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cookieConsent.cookie-visible {
    transform: translateY(0);
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    color: #d4af37;
}

.cookie-text {
    flex: 1;
    min-width: 200px;
}

.cookie-text p {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.cookie-text strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.cookie-text a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
}

.cookie-text a:hover { text-decoration: underline; }

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn-accept {
    padding: 9px 22px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #d4af37, #b8860b);
    color: #0a0a14;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
}

.cookie-btn-settings {
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-settings:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
    .cookie-inner { gap: 14px; }
    .cookie-actions { width: 100%; }
    .cookie-btn-accept,
    .cookie-btn-settings { flex: 1; text-align: center; }
}
