/* ═══════════════════════════════════════════════════════════════════
   ORDER FLOW — LiveThreat Product Ordering Theme
   Standalone CSS (site.css NOT loaded on /order paths)
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Reset & Variables ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange: #E8600A; --orange-light: #F07B2E;
    --orange-dim: rgba(232,96,10,0.08); --orange-border: rgba(232,96,10,0.18);
    --orange-glow: rgba(232,96,10,0.25);
    --navy: #1a1a2e; --navy-dark: #16162a;
    --green: #16a34a; --green-bg: #dcfce7;
    --blue: #2563eb; --blue-bg: #dbeafe;
    --red: #dc2626; --red-bg: #fee2e2;
    --text: #1a1a1a; --text-mid: #4b5563; --text-muted: #9ca3af;
    --bg: #f8f9fb; --white: #ffffff;
    --border: #e5e7eb; --border-light: #f3f4f6;
    --radius: 12px; --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-orange: 0 4px 20px rgba(232,96,10,0.3);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* ═══════════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════════ */
.order-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ─── Header ─────────────────────────────────────────────────────── */
.order-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
}
.order-header-inner {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
}
.order-logo-link { display: flex; align-items: center; }
.order-logo { height: 36px; }
.order-header-right { display: flex; align-items: center; gap: 1rem; }
.order-help-link {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.85rem; color: var(--text-mid);
    padding: 0.4rem 0.8rem; border-radius: 8px;
    transition: all 0.15s;
}
.order-help-link:hover { background: var(--border-light); color: var(--text); }

/* ─── Main ───────────────────────────────────────────────────────── */
.order-main {
    flex: 1;
    padding: 2.5rem 2rem 4rem;
}

/* ─── Footer ─────────────────────────────────────────────────────── */
.order-footer {
    background: var(--navy); color: rgba(255,255,255,0.5);
    padding: 2rem; text-align: center; font-size: 0.8rem;
}
.order-footer-inner { max-width: 1100px; margin: 0 auto; }
.order-footer-brand {
    display: flex; align-items: center; justify-content: center;
    gap: 0.5rem; margin-bottom: 0.75rem; font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* ═══════════════════════════════════════════════════════════════════
   WIZARD CONTAINER
   ═══════════════════════════════════════════════════════════════════ */
.order-container {
    max-width: 720px;
    margin: 0 auto;
}

/* ─── Progress Steps ─────────────────────────────────────────────── */
.order-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 2.5rem;
}
.step {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}
.step.active { color: var(--text); }
.step.done { color: var(--green); }
.step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border-light);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    transition: all 0.3s;
}
.step.active .step-num {
    background: var(--orange); color: white;
}
.step.done .step-num {
    background: var(--green); color: white;
}
.step-line {
    width: 48px; height: 2px;
    background: var(--border);
    margin: 0 0.75rem;
    transition: background 0.3s;
}
.step-line.active { background: var(--orange); }

/* ─── Card ───────────────────────────────────────────────────────── */
.order-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    border: 1px solid var(--border);
}
.order-card-header { margin-bottom: 2rem; }
.order-card-header h2 {
    font-size: 1.5rem; font-weight: 800; color: var(--text);
    margin-bottom: 0.35rem; letter-spacing: -0.01em;
}
.order-card-header p {
    color: var(--text-mid); font-size: 0.95rem;
}

/* ─── Error ──────────────────────────────────────────────────────── */
.order-error {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--red-bg); color: var(--red);
    padding: 0.75rem 1rem; border-radius: 8px;
    margin-bottom: 1.5rem; font-size: 0.9rem; font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.order-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-1 { display: grid; grid-template-columns: 1fr; gap: 1rem; max-width: 50%; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label {
    font-size: 0.8rem; font-weight: 600; color: var(--text-mid);
    text-transform: uppercase; letter-spacing: 0.03em;
}
.form-group .req { color: var(--orange); }
.form-group input, .form-group select {
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    transition: all 0.15s;
    outline: none;
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-dim);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-actions {
    display: flex; align-items: center; justify-content: flex-end;
    gap: 0.75rem; margin-top: 1rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn-primary-order {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--orange); color: white;
    border: none; border-radius: 10px;
    font-size: 0.95rem; font-weight: 700;
    font-family: var(--font);
    cursor: pointer; transition: all 0.2s;
}
.btn-primary-order:hover:not(:disabled) {
    background: var(--orange-light);
    box-shadow: var(--shadow-orange);
    transform: translateY(-1px);
}
.btn-primary-order:disabled {
    opacity: 0.5; cursor: not-allowed;
}

.btn-back {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    background: transparent; color: var(--text-mid);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem; font-weight: 600;
    font-family: var(--font);
    cursor: pointer; transition: all 0.15s;
}
.btn-back:hover { background: var(--border-light); color: var(--text); }

.btn-checkout {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: white; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 700;
    font-family: var(--font);
    cursor: pointer; transition: all 0.2s;
}
.btn-checkout:hover:not(:disabled) {
    box-shadow: var(--shadow-orange);
    transform: translateY(-1px);
}
.btn-checkout:disabled { opacity: 0.6; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════
   PRODUCT SELECTION — Step 2
   ═══════════════════════════════════════════════════════════════════ */
.section-label {
    font-family: var(--mono);
    font-size: 0.8rem; font-weight: 600;
    color: var(--orange); letter-spacing: 0.06em;
    text-transform: uppercase; margin-bottom: 0.5rem;
}

/* Billing Toggle */
.billing-toggle {
    display: flex; align-items: center; justify-content: center;
    gap: 0.75rem; margin: 1.75rem 0 2.25rem;
    font-size: 0.9rem; font-weight: 600; color: var(--text-muted);
}
.billing-toggle span.active { color: var(--text); }
.toggle-switch {
    width: 52px; height: 28px;
    background: var(--border);
    border-radius: 14px;
    cursor: pointer; position: relative;
    transition: background 0.3s;
}
.toggle-switch.on { background: var(--orange); }
.toggle-knob {
    position: absolute; top: 3px; left: 3px;
    width: 22px; height: 22px;
    background: white; border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}
.toggle-switch.on .toggle-knob { transform: translateX(24px); }

/* Product Cards */
.product-cards {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.product-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
}
.product-card:hover { border-color: var(--orange-border); box-shadow: var(--shadow-md); }
.product-card.selected { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }

.product-card.dark {
    background: var(--navy);
    border-color: var(--navy);
}
.product-card.dark:hover { border-color: var(--orange); }
.product-card.dark.selected { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-dim); }

.popular-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--orange); color: white;
    padding: 0.25rem 1rem; border-radius: 100px;
    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em;
    white-space: nowrap;
}

.product-tier-name {
    font-family: var(--mono);
    font-size: 0.75rem; font-weight: 700;
    color: var(--orange); letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 0.75rem;
}
.product-tier-name.light { color: var(--orange); }

.product-desc {
    font-size: 0.88rem; color: var(--text-mid);
    line-height: 1.5; margin-bottom: 1.25rem;
    min-height: 2.6em;
}
.product-desc.light { color: rgba(255,255,255,0.6); }

.product-price {
    display: flex; align-items: baseline; gap: 0.15rem;
    margin-bottom: 0.25rem;
}
.price-amount {
    font-size: 2.5rem; font-weight: 900;
    color: var(--text); letter-spacing: -0.02em;
}
.product-price.light .price-amount { color: white; }
.price-period {
    font-size: 1rem; color: var(--text-mid); font-weight: 500;
}
.product-price.light .price-period { color: rgba(255,255,255,0.5); }
.price-annual {
    font-size: 0.8rem; color: var(--text-muted);
    margin-bottom: 1.5rem;
}
.price-annual.light { color: rgba(255,255,255,0.4); }

.product-limits {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.5rem; margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
    border-radius: 10px; overflow: hidden;
}
.product-card.dark .product-limits {
    border-color: rgba(255,255,255,0.1);
}
.limit {
    padding: 0.75rem;
    display: flex; flex-direction: column; gap: 0.15rem;
}
.limit:first-child { border-right: 1px solid var(--border-light); }
.product-card.dark .limit:first-child { border-color: rgba(255,255,255,0.1); }
.limit-label {
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-muted);
}
.limit-label.light { color: rgba(255,255,255,0.4); }
.limit-value {
    font-size: 1.5rem; font-weight: 800; color: var(--text);
}
.limit-value.light { color: white; }

.btn-buy {
    width: 100%; padding: 0.8rem;
    background: var(--white); color: var(--text);
    border: 2px solid var(--orange);
    border-radius: 10px;
    font-size: 0.95rem; font-weight: 700;
    font-family: var(--font);
    cursor: pointer; transition: all 0.2s;
}
.btn-buy:hover { background: var(--orange); color: white; }
.btn-buy.selected { background: var(--orange); color: white; }

.btn-buy.dark-btn {
    background: var(--orange); color: white;
    border-color: var(--orange);
}
.btn-buy.dark-btn:hover {
    background: var(--orange-light);
    box-shadow: var(--shadow-orange);
}
.btn-buy.dark-btn.selected {
    background: var(--green); border-color: var(--green);
}

/* ═══════════════════════════════════════════════════════════════════
   REVIEW — Step 3
   ═══════════════════════════════════════════════════════════════════ */
.review-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.review-section h3 {
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.review-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 2rem;
}
.review-item {
    display: flex; flex-direction: column;
    padding: 0.4rem 0;
}
.review-label {
    font-size: 0.72rem; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.04em;
}
.review-item span:last-child {
    font-size: 0.95rem; color: var(--text); font-weight: 500;
}

.review-plan-card {
    background: var(--orange-dim);
    border: 1px solid var(--orange-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.review-plan-name {
    font-weight: 700; font-size: 1rem; color: var(--text);
    margin-bottom: 0.25rem;
}
.review-plan-price {
    display: flex; align-items: baseline; gap: 0.15rem;
}
.review-price-big {
    font-size: 1.75rem; font-weight: 900; color: var(--orange);
}
.review-price-cycle {
    font-size: 0.9rem; color: var(--text-mid);
}
.review-plan-features {
    display: flex; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-mid);
    margin-top: 0.5rem;
}

.secure-note {
    display: flex; align-items: center; justify-content: center;
    gap: 0.4rem; margin-top: 1.25rem;
    font-size: 0.8rem; color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   SUCCESS PAGE
   ═══════════════════════════════════════════════════════════════════ */
.success-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--green-bg);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 0.5rem;
}
.success-steps {
    display: flex; flex-direction: column; gap: 0;
    text-align: left; max-width: 420px; margin: 0 auto;
}
.success-step {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
    opacity: 0.5;
}
.success-step.done { opacity: 1; }
.success-step.active { opacity: 1; }
.success-step:last-child { border: none; }
.success-step-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.success-step.done .success-step-icon {
    background: var(--green-bg); color: var(--green);
}
.success-step.active .success-step-icon {
    background: var(--orange-dim); color: var(--orange);
}
.success-step div:last-child { display: flex; flex-direction: column; }
.success-step strong {
    font-size: 0.9rem; font-weight: 700; color: var(--text);
}
.success-step span {
    font-size: 0.8rem; color: var(--text-muted); margin-top: 0.1rem;
}

.success-step-icon.pulse { animation: order-pulse 2s infinite; }
@keyframes order-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ═══════════════════════════════════════════════════════════════════
   SPINNER & ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in {
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .order-card { padding: 1.5rem; }
    .form-row-2 { grid-template-columns: 1fr; }
    .form-row-1 { max-width: 100%; }
    .product-cards { grid-template-columns: 1fr; }
    .review-grid { grid-template-columns: 1fr; }
    .order-steps { gap: 0; }
    .step span { display: none; }
    .step-line { width: 32px; }
    .order-main { padding: 1.5rem 1rem 3rem; }
    .price-amount { font-size: 2rem; }
}
