
/* app/static/css/billing.css */

/* ── SHARED WRAPPERS ── */

*,
*::before,
*::after{
    box-sizing:border-box;
}

html,
body{
    height:100%;
    margin:0;
    overflow:hidden;          /* page never exceeds viewport */
}

.billing-wrapper {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    padding: 2rem;
}

.checkout-wrapper {
    align-items: stretch;
    padding: 0;
}

/* ── CHECKOUT: LEFT COLUMN (Context) ── */
.checkout-context {
    flex: 1; 
    background: var(--brand-dark, #0f172a); 
    color: #fff; 
    padding: 2.5rem 10%; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    position: relative; 
    overflow: hidden;
}

.checkout-context::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.context-header { margin-bottom: 3rem; position: relative; z-index: 2; }
.context-header h1 { font-size: 2.5rem; font-family: 'Outfit', sans-serif; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -1px; }
.context-header p { color: #94a3b8; font-size: 1.1rem; line-height: 1.6; max-width: 400px; }

.value-props { display: flex; flex-direction: column; gap: 1.5rem; position: relative; z-index: 2; }
.value-prop { display: flex; align-items: flex-start; gap: 1rem; }
.value-prop i { font-size: 1.25rem; color: #38bdf8; background: rgba(56, 189, 248, 0.1); padding: 8px; border-radius: 8px; }
.value-prop h4 { margin: 0 0 4px 0; font-size: 1.05rem; font-weight: 600; color: #f8fafc; }
.value-prop p { margin: 0; font-size: 0.85rem; color: #94a3b8; line-height: 1.5; }

/* ── CHECKOUT: RIGHT COLUMN (Terminal) ── */
.checkout-terminal {
    width: 550px; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px);
    padding: 1.5rem 3rem; display: flex; flex-direction: column; justify-content: center;
    box-shadow: -20px 0 50px rgba(0,0,0,0.05); z-index: 10; overflow: auto;

}

@media (max-width: 1024px) {
    .billing-wrapper.checkout-wrapper { flex-direction: column; }
    .checkout-context { padding: 3rem 2rem; flex: none; }
    .checkout-terminal { width: 100%; padding: 3rem 2rem; box-shadow: none; }
}

.order-summary {
    background: #f1f5f9; border-radius: 12px; padding: 1.5rem; margin-bottom: 2.5rem; border: 1px solid #e2e8f0;
}
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; font-size: 0.95rem; }
.summary-row.total { border-top: 2px dashed #cbd5e1; padding-top: 1rem; margin-top: 1rem; margin-bottom: 0; font-weight: 800; font-size: 1.25rem; color: var(--brand-dark, #0f172a); }
.line-item-desc { font-size: 0.75rem; color: var(--text-light, #64748b); margin-top: 2px; }

.payment-tabs { display: flex; gap: 10px; margin-bottom: 1.5rem; }
.pay-tab {
    flex: 1; padding: 1rem; text-align: center; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; font-weight: 600; color: var(--text-light, #64748b); transition: 0.2s; background: #fff;
}
.pay-tab:hover { border-color: #cbd5e1; }
.pay-tab.active { border-color: var(--brand-accent, #7c3aed); color: var(--brand-accent, #7c3aed); background: rgba(124, 58, 237, 0.05); }

.pay-form { display: none; animation: fadeIn 0.3s ease; }
.pay-form.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.billing-form-group { margin-bottom: 1.25rem; }
.billing-form-group label { display: block; font-size: 0.75rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.billing-form-group input { width: 100%; padding: 0.85rem 1rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 1rem; color: #1e293b; outline: none; transition: 0.2s; font-family: 'Inter', sans-serif; box-sizing: border-box;}
.billing-form-group input:focus { border-color: var(--brand-accent, #7c3aed); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); }

.btn-billing-submit {
    width: 100%; padding: 1rem; background: var(--brand-dark, #0f172a); color: #fff; border: none; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-billing-submit:hover { background: #1e293b; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.btn-stripe { background: #6366f1; }
.btn-stripe:hover { background: #4f46e5; box-shadow: 0 10px 25px rgba(99,102,241,0.25); }

/* ── STATUS PAGES (Success & Failed) ── */
.status-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.icon-success, .icon-failed {
    width: 80px; height: 80px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem auto;
}
.icon-success { background: linear-gradient(135deg, #10b981 0%, #34d399 100%); box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3); }
.icon-success i { font-size: 2.5rem; color: #fff; }
.icon-failed { background: #fef2f2; border: 2px solid #fee2e2; }
.icon-failed i { font-size: 2.5rem; color: #ef4444; }

.status-title { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800; letter-spacing: -1px; color: #0f172a; margin-bottom: 0.5rem; }
.status-desc { font-size: 1rem; color: #64748b; line-height: 1.6; margin-bottom: 2rem; }

.data-box {
    background: #f1f5f9; border-radius: 12px; padding: 1.5rem; margin-bottom: 2rem; text-align: left;
}
.data-box.failed { border-left: 4px solid #ef4444; background: #f8fafc; }
.data-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.5rem; color: #475569; }
.data-row:last-child { margin-bottom: 0; }
.data-row.bold { font-weight: 700; color: #0f172a; border-top: 1px solid #cbd5e1; padding-top: 0.5rem; margin-top: 0.5rem; }

.btn-status-primary {
    display: flex; align-items: center; justify-content: center; width: 100%; padding: 1rem;
    background: var(--brand-dark, #0f172a); color: #fff; text-decoration: none; border-radius: 12px; font-weight: 700; transition: 0.2s; margin-bottom: 1rem;
}
.btn-status-primary:hover { background: #1e293b; transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); color: #fff; }

.btn-status-secondary {
    display: flex; align-items: center; justify-content: center; width: 100%; padding: 1rem;
    background: transparent; color: #64748b; text-decoration: none; border-radius: 12px; font-weight: 600; border: 1px solid #cbd5e1; transition: 0.2s;
}
.btn-status-secondary:hover { background: #f1f5f9; color: #0f172a; border-color: #94a3b8; }

/* Spinner */
.spinner { display: none; width: 18px; height: 18px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 1s infinite linear; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-billing-submit.loading .spinner { display: block; }
.btn-billing-submit.loading span { display: none; }


/* ── Live Preview Card ── */
.live-preview-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.live-preview-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-cyan);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.status-pill .dot {
    width: 6px; height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

.preview-link-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-link-block:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.preview-link-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    opacity: 0.9;
}


