/* WHMCS Checkout — self-contained styles (no theme dependency) */

/* ---- Reset / base ---- */
.wcsc-wrap *, .wcsc-wrap *::before, .wcsc-wrap *::after { box-sizing: border-box; }
.wcsc-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #222; line-height: 1.5; padding-bottom: 60px; }
.hidden { display: none !important; }

/* ---- Progress bar ---- */
.wcsc-progress {
    display: flex; align-items: center; justify-content: center;
    gap: 0; margin-bottom: 40px; list-style: none; padding: 0;
}
.wcsc-step {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: #aaa;
    padding: 8px 16px; position: relative;
}
.wcsc-step + .wcsc-step::before {
    content: ''; display: block; width: 32px; height: 2px;
    background: #e0e0e0; position: absolute; left: -16px;
}
.wcsc-step-num {
    width: 30px; height: 30px; border-radius: 50%;
    background: #f0f0f0; border: 2px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    transition: background .2s, border-color .2s, color .2s;
}
.wcsc-step.active .wcsc-step-num { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.wcsc-step.active .wcsc-step-label { color: #222; }
.wcsc-step.done .wcsc-step-num { background: #ede9fe; border-color: #c4b5fd; color: #7c3aed; }
.wcsc-step.done .wcsc-step-label { color: #7c3aed; }

/* ---- Panel ---- */
.wcsc-panel.hidden { display: none; }
.wcsc-panel-title { font-size: clamp(20px, 3vw, 26px); font-weight: 700; margin: 0 0 8px; letter-spacing: -.02em; }
.wcsc-panel-sub   { color: #666; font-size: 14px; margin: 0 0 24px; }

/* ---- Billing toggle ---- */
.wcsc-billing-toggle { text-align: center; margin-bottom: 24px; }
.wcsc-bill-btn {
    background: #f5f5f8; border: 1px solid #e0e0e8; padding: 8px 20px;
    border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
    color: #666; transition: background .18s, color .18s;
}
.wcsc-bill-btn.active { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.wcsc-save-badge { background: #d1fae5; color: #065f46; font-size: 11px; padding: 1px 6px; border-radius: 999px; margin-left: 4px; }

/* ---- Category tabs ---- */
.wcsc-cat-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 24px; border-bottom: 2px solid #e8e8f0; padding-bottom: 0;
}
.wcsc-cat-tab {
    background: none; border: none; padding: 10px 20px;
    font-size: 14px; font-weight: 600; color: #888; cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    border-radius: 4px 4px 0 0; transition: color .15s, border-color .15s;
}
.wcsc-cat-tab:hover { color: #7c3aed; }
.wcsc-cat-tab.active { color: #7c3aed; border-bottom-color: #7c3aed; }

/* ---- Plan cards grid ---- */
.wcsc-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.wcsc-plan-card {
    border: 2px solid #e8e8e8; border-radius: 18px; padding: 22px 20px;
    cursor: pointer; position: relative; background: #fff;
    transition: border-color .18s, box-shadow .18s, transform .15s;
    outline: none;
    display: flex; flex-direction: column;
}
.wcsc-plan-card .wcsc-select-btn { margin-top: auto; width: 100%; justify-content: center; }
.wcsc-plan-card:hover, .wcsc-plan-card:focus-visible {
    border-color: #c4b5fd;
    box-shadow: 0 4px 16px -4px rgba(124,58,237,.15);
    transform: translateY(-2px);
}
.wcsc-plan-card.selected {
    border-color: #7c3aed;
    box-shadow: 0 6px 20px -4px rgba(124,58,237,.25);
}
.wcsc-plan-card.wcsc-featured { background: linear-gradient(145deg, #faf5ff, #fff); }
.wcsc-badge {
    position: absolute; top: -1px; right: 16px;
    background: #7c3aed; color: #fff;
    font-size: 10px; font-weight: 700; padding: 3px 10px;
    border-radius: 0 0 8px 8px; text-transform: uppercase; letter-spacing: .05em;
}
.wcsc-plan-select-indicator {
    display: none; position: absolute; top: 14px; right: 14px;
    width: 22px; height: 22px; background: #7c3aed;
    border-radius: 50%; align-items: center; justify-content: center;
}
.wcsc-plan-card.selected .wcsc-plan-select-indicator { display: flex; }

.wcsc-plan-name  { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.wcsc-plan-desc  { font-size: 13px; color: #666; margin-bottom: 14px; }
.wcsc-plan-price { display: flex; align-items: baseline; gap: 3px; margin-bottom: 4px; flex-wrap: wrap; }
.wcsc-price-val  { font-size: 26px; font-weight: 800; }
.wcsc-price-per  { font-size: 13px; color: #888; }
.wcsc-price-na   { font-size: 13px; color: #bbb; font-style: italic; }
.wcsc-setup-fee  { width: 100%; font-size: 12px; color: #7c3aed; font-weight: 600; margin-top: 2px; }
.wcsc-cycle-na   { opacity: .45; pointer-events: none; }

.wcsc-feature-list { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.wcsc-feature-list li { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: #444; }
.wcsc-feature-list svg { flex-shrink: 0; margin-top: 2px; stroke: #7c3aed; }

/* ---- Buttons ---- */
.wcsc-actions       { margin-top: 24px; display: flex; justify-content: flex-end; }
.wcsc-actions-split { justify-content: space-between; }
.wcsc-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 28px; border-radius: 999px;
    font-family: inherit; font-size: 15px; font-weight: 700;
    cursor: pointer; border: none; text-decoration: none;
    transition: background .18s, opacity .15s, transform .12s;
}
.wcsc-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.wcsc-btn-primary {
    background: #7c3aed; color: #fff;
    box-shadow: 0 6px 18px -4px rgba(124,58,237,.4);
}
.wcsc-btn-primary:hover { background: #6d28d9; transform: translateY(-1px); color: #fff; }
.wcsc-btn-outline {
    background: transparent; color: #7c3aed;
    border: 2px solid #c4b5fd;
}
.wcsc-btn-outline:hover { background: #faf5ff; border-color: #7c3aed; }
.wcsc-btn-ghost {
    background: transparent; color: #555;
    border: 1.5px solid #d0d0d8;
}
.wcsc-btn-ghost:hover { color: #222; border-color: #a0a0b0; }

/* ---- Social login (Step 2) ---- */
.wcsc-social-wrap    { margin-bottom: 4px; }
.wcsc-social-heading { text-align: center; font-size: 12px; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.wcsc-social-btns    { display: flex; flex-direction: column; gap: 10px; }
.wcsc-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; height: 48px; padding: 0 20px;
    background: #fff; border: 1.5px solid #e0e0eb; border-radius: 10px;
    font-family: inherit; font-size: 14px; font-weight: 600; color: #222;
    cursor: pointer; position: relative;
    transition: border-color .15s, box-shadow .15s, background .15s, transform .1s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.wcsc-social-btn:hover  { border-color: #b0b0c8; box-shadow: 0 3px 10px rgba(0,0,0,.1); background: #fafafa; transform: translateY(-1px); }
.wcsc-social-btn:active { transform: translateY(0); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.wcsc-social-icon { width: 20px; height: 20px; flex-shrink: 0; }
.wcsc-social-divider {
    display: flex; align-items: center; gap: 12px;
    color: #bbb; font-size: 12px; font-weight: 500;
    margin: 20px 0;
}
.wcsc-social-divider::before,
.wcsc-social-divider::after { content: ''; flex: 1; height: 1px; background: #ebebf2; }

/* Facebook email fallback prompt */
.wcsc-fb-email-box {
    display: flex; align-items: center; gap: 14px;
    background: #f0f7ff; border: 1.5px solid #bfdbfe;
    border-radius: 10px; padding: 14px 16px; margin-bottom: 4px;
}
.wcsc-fb-email-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    background: #1877f2; color: #fff; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.wcsc-fb-email-name { font-size: 14px; font-weight: 700; color: #111; margin: 0 0 2px; }
.wcsc-fb-email-sub  { font-size: 12px; color: #555; margin: 0; }

/* ---- Account toggle (Step 2) ---- */
.wcsc-acct-toggle {
    display: flex; background: #f5f5f8; border: 1px solid #e0e0e8;
    border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 24px;
}
.wcsc-acct-tab {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; background: none; border: none; padding: 9px 16px;
    border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer; color: #666; transition: background .18s, color .18s;
    white-space: nowrap;
}
.wcsc-acct-tab.active { background: #fff; color: #7c3aed; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ---- Form fields ---- */
.wcsc-row         { display: grid; gap: 14px; margin-bottom: 14px; }
.wcsc-two-col     { grid-template-columns: 1fr 1fr; }
.wcsc-three-col   { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 580px) {
    .wcsc-two-col, .wcsc-three-col { grid-template-columns: 1fr; }
    .wcsc-acct-tab { font-size: 12px; padding: 8px 10px; }
    .wcsc-plans-grid { grid-template-columns: 1fr; }
}

.wcsc-field         { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.wcsc-field label   { font-size: 13px; font-weight: 600; color: #333; }
.wcsc-field label span { color: #7c3aed; }
.wcsc-field input, .wcsc-field select {
    height: 44px; padding: 0 14px;
    border: 1.5px solid #d0d0d8; border-radius: 8px;
    font-family: inherit; font-size: 15px; color: #222;
    background: #fff; outline: none; -webkit-appearance: none;
    width: 100%; transition: border-color .15s, box-shadow .15s;
}
.wcsc-field input:focus, .wcsc-field select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

/* ---- Order summary ---- */
.wcsc-order-summary {
    background: #f8f8fc; border: 1px solid #e8e8e8;
    border-radius: 14px; padding: 18px 22px; margin-bottom: 20px;
}
.wcsc-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid #ebebeb; font-size: 14px;
}
.wcsc-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.wcsc-summary-label { color: #666; }
.wcsc-summary-value { font-weight: 600; color: #222; }
.wcsc-summary-total .wcsc-summary-label { font-weight: 700; font-size: 15px; color: #222; }
.wcsc-summary-total .wcsc-summary-value { font-size: 20px; font-weight: 800; color: #7c3aed; }

/* ---- Notices ---- */
.wcsc-notice { border-radius: 8px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 14px; line-height: 1.5; }
.wcsc-notice.hidden { display: none; }
.wcsc-notice-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.wcsc-notice-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.wcsc-notice-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ---- Loading spinner ---- */
.wcsc-loading { text-align: center; padding: 32px 0; color: #666; font-size: 14px; }
.wcsc-loading.hidden { display: none; }
.wcsc-spinner {
    width: 40px; height: 40px; border: 3px solid #e0e0e8;
    border-top-color: #7c3aed; border-radius: 50%;
    animation: wcsc-spin .7s linear infinite; margin: 0 auto 12px;
}
@keyframes wcsc-spin { to { transform: rotate(360deg); } }

/* ---- Invoice card ---- */
.wcsc-invoice-box {
    background: #f8f8fc; border: 1.5px solid #e0e0e8;
    border-radius: 14px; padding: 22px 24px; margin-bottom: 20px;
}
.wcsc-invoice-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.wcsc-invoice-label { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .06em; }
.wcsc-invoice-num   { font-size: 14px; font-weight: 600; color: #444; }
.wcsc-invoice-badge { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; margin-left: auto; }
.wcsc-invoice-row   { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #333; margin-bottom: 4px; }
.wcsc-invoice-divider { height: 1px; background: #e8e8e8; margin: 12px 0; }
.wcsc-invoice-total-row { display: flex; justify-content: space-between; align-items: center; }
.wcsc-invoice-total-row span  { font-size: 14px; color: #666; font-weight: 600; }
.wcsc-invoice-total-row strong { font-size: 24px; font-weight: 800; color: #7c3aed; }

/* ---- Pay Now button ---- */
.wcsc-btn-pay {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    height: 54px; padding: 0 36px; background: #003087; color: #fff;
    border-radius: 999px; font-size: 16px; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 18px -4px rgba(0,48,135,.45);
    transition: background .18s, transform .12s;
}
.wcsc-btn-pay:hover { background: #001f5e; transform: translateY(-1px); color: #fff; }
.wcsc-pay-note {
    margin: 10px 0 0; font-size: 12px; color: #888;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}

/* ---- PayPal Basic redirect button ---- */
.wcsc-paypal-basic-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: #ffc439; color: #003087;
    border-radius: 4px; font-size: 16px; font-weight: 700;
    padding: 14px 40px; text-decoration: none;
    transition: background .15s, transform .12s;
    box-shadow: 0 4px 12px -3px rgba(255,196,57,.6);
    border: none; cursor: pointer;
}
.wcsc-paypal-basic-btn:hover { background: #f0b429; transform: translateY(-1px); color: #003087; }

/* ---- Pay with PayPal button (Basic mode CTA) ---- */
.wcsc-btn-paypal {
    display: inline-flex; align-items: center; gap: 8px;
    background: #ffc439; color: #003087;
    border: none; border-radius: 6px;
    font-size: 16px; font-weight: 700;
    padding: 0 28px; height: 48px;
    cursor: pointer; text-decoration: none;
    transition: background .15s, transform .12s;
    box-shadow: 0 4px 14px -4px rgba(255,196,57,.55);
}
.wcsc-btn-paypal:hover { background: #f0b429; transform: translateY(-1px); color: #003087; }
