/* =====================================================================
   checkout-glass.css — estética compartilhada das páginas públicas de venda
   (carrinhoplano.php = vitrine de planos, contratar.php = checkout PF).
   Glassmorphism sobre gradiente de marca Viva Mais Card.
   Mantém os MESMOS nomes de classe usados pelo JS (.inp, .btn-primary,
   .dot, .metodo, .card-plano, .tab…), só moderniza o estilo.
   ===================================================================== */

:root {
    --vmc-azul: #2563eb;
    --vmc-azul-esc: #1e3a8a;
    --vmc-indigo: #4f46e5;
    --vmc-tinta: #1e293b;        /* texto escuro sobre vidro claro */
    --vmc-tinta-2: #475569;
    --vmc-tinta-3: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.82);
    --glass-brd: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 12px 40px rgba(30, 58, 138, 0.18);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--vmc-tinta);
    min-height: 100vh;
    /* Gradiente profundo e elegante (navy -> índigo), sem neon. */
    background: linear-gradient(145deg, #0b1437 0%, #16266b 42%, #312e81 100%);
    background-attachment: fixed;
    position: relative;
}

/* Blobs de luz suaves sobre o gradiente (decorativos, não interativos). */
body::before,
body::after {
    content: "";
    position: fixed;
    border-radius: 9999px;
    filter: blur(80px);
    opacity: 0.30;
    pointer-events: none;
    z-index: 0;
}
body::before {
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(59,130,246,0.7) 0%, transparent 70%);
    top: -140px; left: -120px;
    animation: blobA 18s ease-in-out infinite alternate;
}
body::after {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(99,102,241,0.6) 0%, transparent 70%);
    bottom: -180px; right: -140px;
    animation: blobB 22s ease-in-out infinite alternate;
}
@keyframes blobA { to { transform: translate(60px, 40px) scale(1.1); } }
@keyframes blobB { to { transform: translate(-50px, -30px) scale(1.08); } }

/* Garante que o conteúdo fique acima dos blobs. */
body > * { position: relative; z-index: 1; }

/* ---------------- Cartões de vidro ---------------- */
.glass {
    position: relative;
    /* Card SÓLIDO e limpo (branco), texto escuro legível, sombra suave.
       Mantém o nome .glass por compat com o JS; visual é card moderno, não translúcido. */
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 1.1rem;
    box-shadow: 0 12px 34px -14px rgba(7, 16, 48, 0.45);
    color: var(--vmc-tinta);
}
.glass-dark {
    /* Painéis da sidebar — navy translúcido sobre o gradiente, texto branco. */
    background: rgba(10, 18, 45, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.9rem;
}

/* Gradiente sólido (sidebar do checkout / hero). */
.grad {
    background: linear-gradient(160deg, rgba(30,58,138,0.92) 0%, rgba(37,99,235,0.88) 55%, rgba(79,70,229,0.9) 100%);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* ---------------- Inputs / labels ---------------- */
.lbl {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--vmc-tinta-2);
    margin-bottom: 0.3rem;
    letter-spacing: 0.01em;
}
.inp {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 0.7rem;
    color: var(--vmc-tinta);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.inp::placeholder { color: #94a3b8; }
.inp:hover { border-color: rgba(37, 99, 235, 0.45); }
.inp:focus {
    outline: none;
    background: #fff;
    border-color: var(--vmc-azul);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
/* Estados de validação (UX) — aplicados via classe opcional, sem mudar lógica. */
.inp.is-erro   { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.inp.is-ok     { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.14); }

/* ---------------- Botões ---------------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #fff;
    padding: 0.7rem 1.7rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.55);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 12px 26px -6px rgba(37, 99, 235, 0.6); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.65);
    color: var(--vmc-tinta-2);
    padding: 0.7rem 1.3rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.92); border-color: rgba(37, 99, 235, 0.4); }

/* ---------------- Passos (checkout) ---------------- */
.dot {
    width: 2.1rem; height: 2.1rem;
    border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
    background: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.35);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: all .25s ease;
    flex-shrink: 0;
}
.dot.ativa {
    background: #fff;
    color: var(--vmc-azul);
    border-color: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

/* Trilha de progresso (UX) */
.progress-track {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    overflow: hidden;
}
.progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    background: linear-gradient(90deg, #93c5fd, #fff);
    border-radius: 9999px;
    transition: width .4s ease;
}

/* ---------------- Métodos de pagamento ---------------- */
.metodo {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 1.4rem 1rem;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    color: var(--vmc-tinta);
    transition: border-color .15s ease, background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.metodo:hover { border-color: #93c5fd; background: #f1f5fb; transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(37,99,235,0.45); }
.metodo.sel {
    border-color: var(--vmc-azul);
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}
.badge {
    position: absolute;
    top: -10px; right: 10px;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    color: #fff;
}

/* ---------------- Vitrine: cards de plano e abas ---------------- */
.card-plano {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-plano:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 56px -16px rgba(30, 58, 138, 0.5);
    border-color: rgba(255, 255, 255, 0.85);
}
.tab {
    color: var(--vmc-tinta-3);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all .18s ease;
}
.tab:hover { color: var(--vmc-azul); background: rgba(37, 99, 235, 0.08); }
.tab.ativa {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ---------------- Transição entre passos (UX) ---------------- */
.step-anim { animation: stepIn .35s ease both; }
@keyframes stepIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- Acessibilidade: reduzir movimento ---------------- */
@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none; }
    .card-plano, .btn-primary, .metodo, .dot, .progress-fill, .step-anim { transition: none; animation: none; }
    .card-plano:hover, .metodo:hover, .btn-primary:hover { transform: none; }
}
