/* ============================================
   Flash Recargas — Checkout Page Styles
   ============================================ */

/* Fundo e corpo do checkout */
.checkout-body {
    background: linear-gradient(145deg, #f8fafc 0%, #eef2ff 50%, #faf5ff 100%);
    min-height: 100vh;
}

/* Header do checkout */
.checkout-header-bar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;
}
.checkout-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.checkout-secure {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Layout principal */
.checkout-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
/* No desktop: formulário à esquerda, resumo à direita */
.checkout-action-area { order: 1; }
.order-summary { order: 2; }

/* Resumo do pedido */
.order-summary {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}
.order-summary h2 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    color: #1e293b;
}
.product-info {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}
.product-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}
.product-details h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #1e293b;
}
.product-details p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}
.price-breakdown {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-bottom: 20px;
}
.price-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #475569;
}
.price-row.highlight {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
}
.total-price {
    color: #7F54B3;
}
.trust-indicators {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #475569;
}

/* ================================================
   ESTADOS DO CHECKOUT — CONTROLE DE VISIBILIDADE
   Esta é a parte crítica que mostra/esconde as telas
   ================================================ */
.checkout-state {
    transition: opacity 0.3s ease;
}
.checkout-state.hidden-state {
    display: none !important;
}
.checkout-state.active-state {
    display: block;
}

/* Área de ação */
.checkout-action-area {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

/* Loader */
.checkout-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #7F54B3;
    border-radius: 50%;
    margin: 40px auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#checkout-loader p {
    text-align: center;
    color: #64748b;
    font-size: 0.95rem;
}

/* Pill do plano */
.plan-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.plan-pill-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}
.plan-pill-price {
    font-weight: 700;
    font-size: 1rem;
    color: #7F54B3;
}

/* Formulário */
#checkout-lead-form h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    color: #1e293b;
}
#checkout-lead-form .subtitle {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.85rem;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.checkout-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    color: #1e293b;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}
.checkout-input:focus {
    border-color: #7F54B3;
    box-shadow: 0 0 0 3px rgba(127,84,179,0.12);
}
.checkout-input::placeholder {
    color: #9ca3af;
}

/* Botão principal */
.btn-checkout-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #7F54B3 0%, #5f3d8a 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-top: 8px;
    font-family: inherit;
    box-shadow: 0 4px 15px rgba(127,84,179,0.3);
}
.btn-checkout-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(127,84,179,0.4);
}

.login-hint {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: #64748b;
}
.login-hint a {
    color: #7F54B3;
    font-weight: 600;
    text-decoration: none;
}

/* PIX Area */
.pix-header {
    text-align: center;
    margin-bottom: 20px;
}
.pix-logo {
    width: 80px;
    margin-bottom: 10px;
}
.pix-header h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
    color: #1e293b;
}
.pix-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}
.qr-code-wrapper {
    text-align: center;
    margin-bottom: 25px;
}
.qr-code-wrapper img {
    max-width: 180px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}
.copy-paste-area {
    margin-bottom: 25px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.copy-paste-area label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    text-align: center;
}
.copy-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.copy-input-group input {
    width: 100%;
    padding: 14px;
    border: 1px dashed #94a3b8;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #475569;
    background: #fff;
    outline: none;
    font-family: monospace;
    text-align: center;
    box-sizing: border-box;
}
.copy-input-group button {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    font-family: inherit;
    width: 100%;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}
.copy-input-group button:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Status de pagamento */
.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
}
.status-indicator {
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
#payment-status-text {
    font-size: 0.85rem;
    color: #92400e;
    font-weight: 600;
}

/* Responsivo mobile */
@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .checkout-main {
        padding: 20px 16px;
    }
    .checkout-action-area,
    .order-summary {
        padding: 20px;
    }
}
