/* Site Guardian Billing — Pricing Page Styles */

.sgb-pricing-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Header ──────────────────────────────────────────────────────── */
.sgb-pricing-header { text-align: center; margin-bottom: 48px; }
.sgb-pricing-header h1 { font-size: 2.2em; margin-bottom: 10px; }
.sgb-pricing-header p  { color: #64748b; font-size: 1.05em; }

/* ── Plan grid ───────────────────────────────────────────────────── */
.sgb-plan-grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( 260px, 1fr ) );
    gap: 24px;
    align-items: start;
}

/* ── Plan card ───────────────────────────────────────────────────── */
.sgb-plan-card {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px 24px;
    position: relative;
    transition: box-shadow .2s, border-color .2s;
}
.sgb-plan-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.sgb-plan-card.sgb-popular {
    border-color: #6d28d9;
    box-shadow: 0 4px 20px rgba(109,40,217,.2);
}
.sgb-plan-card.sgb-current { border-color: #16a34a; }

.sgb-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX( -50% );
    background: #6d28d9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 4px 16px;
    border-radius: 20px;
}

/* ── Plan header ─────────────────────────────────────────────────── */
.sgb-plan-header { text-align: center; margin-bottom: 24px; }
.sgb-plan-header h2 { font-size: 1.3em; margin: 0 0 4px; }
.sgb-plan-price { font-size: 2.4em; font-weight: 700; color: #0f172a; line-height: 1.1; }
.sgb-plan-price span { font-size: .45em; color: #64748b; font-weight: 400; }
.sgb-plan-credits { color: #64748b; font-size: .9em; margin-top: 4px; }

/* ── Feature list ────────────────────────────────────────────────── */
.sgb-plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}
.sgb-plan-features li {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .9em;
    color: #334155;
}
.sgb-plan-features li:last-child { border-bottom: none; }
.sgb-feat-on  { color: #15803d; }
.sgb-feat-off { color: #94a3b8; }
.sgb-feat-note { color: #475569; font-style: italic; }

/* ── CTA buttons ─────────────────────────────────────────────────── */
.sgb-plan-cta { display: flex; flex-direction: column; gap: 10px; }
.sgb-btn {
    display: block;
    width: 100%;
    padding: 11px 0;
    border-radius: 8px;
    font-size: .95em;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: opacity .15s;
    text-decoration: none;
}
.sgb-btn:hover { opacity: .88; }
.sgb-btn-stripe  { background: #635bff; color: #fff; }
.sgb-btn-paypal  { background: #003087; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.sgb-btn-primary { background: #2563eb; color: #fff; display: inline-block; padding: 11px 28px; width: auto; }
.sgb-btn-secondary { background: #f1f5f9; color: #334155; display: inline-block; padding: 11px 28px; width: auto; }
.sgb-btn-disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.sgb-current-plan { text-align: center; color: #16a34a; font-weight: 600; padding: 10px 0; }

/* ── Footer ──────────────────────────────────────────────────────── */
.sgb-pricing-footer {
    text-align: center;
    margin-top: 40px;
    color: #64748b;
    font-size: .9em;
}
.sgb-manage-link a { color: #2563eb; }

/* ── Loading overlay ─────────────────────────────────────────────── */
.sgb-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 1.1em;
    color: #334155;
}
.sgb-loading-spinner {
    width: 40px; height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #6d28d9;
    border-radius: 50%;
    animation: sgb-spin .7s linear infinite;
    margin-bottom: 16px;
}
@keyframes sgb-spin { to { transform: rotate(360deg); } }

/* ── Checkout result pages ───────────────────────────────────────── */
.sgb-checkout-result {
    max-width: 600px;
    margin: 60px auto;
    text-align: center;
    padding: 40px 24px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
}
.sgb-result-icon { font-size: 3em; margin-bottom: 12px; }
.sgb-checkout-result h1 { margin-bottom: 12px; }
.sgb-activated-plan { margin: 16px 0; font-size: 1.05em; }
.sgb-plan-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .95em;
}
.sgb-plan-badge.starter { background: #dbeafe; color: #1d4ed8; }
.sgb-plan-badge.pro     { background: #ede9fe; color: #6d28d9; }

.sgb-notice {
    background: #fef9c3;
    border: 1px solid #fde047;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 20px 0;
    text-align: left;
    font-size: .9em;
}
.sgb-next-steps {
    text-align: left;
    background: #f8fafc;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
}
.sgb-next-steps h2 { margin-top: 0; font-size: 1em; color: #334155; }
.sgb-next-steps ol { padding-left: 20px; color: #475569; font-size: .9em; line-height: 1.7; }

.sgb-cancel-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
