/* ==========================================================================
   Callsure subscription surfaces — registration, plan/billing funnel and
   My Subscriptions. Shares the design language of callsure.css:
     - chrome/CTAs:  navy #0a3a6e (hover #072b52)
     - cards:        #fff, 1px #e4e8ee border, 6-10px radius, soft shadow
     - text:         #1f2d3d titles, #64748b muted, 12px/600 #334155 labels
     - product identity accents (cards only):
         CallSure #2563eb · PolicySure #059669 · GrowthSure #7c3aed
   All classes are namespaced `csub-` so they never collide with callsure.css
   or the app theme.
   ========================================================================== */

/* ---- Shared card ---------------------------------------------------------- */
.csub-card {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 22px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.06);
}
.csub-card-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f3;
    font-size: 15px;
    font-weight: 600;
    color: #1f2d3d;
}
.csub-muted { color: #64748b; }

/* ---- Funnel step tabs (Choose Plan / Billing) ----------------------------- */
.csub-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.06);
}
.csub-steps > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5a6a;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}
.csub-steps > a:hover,
.csub-steps > a:focus { background: #eef2f7; color: #1f2d3d; }
.csub-steps > a.active {
    background: #0a3a6e;
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 58, 110, 0.3);
}
.csub-steps .csub-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(10, 58, 110, 0.12);
    color: #0a3a6e;
    font-size: 11px;
    font-weight: 700;
}
.csub-steps > a.active .csub-step-num { background: rgba(255, 255, 255, 0.25); color: #fff; }
.csub-steps .csub-steps-note {
    margin-left: auto;
    padding-right: 10px;
    font-size: 12px;
    color: #64748b;
}

/* ---- Primary / secondary actions ------------------------------------------ */
.csub-btn-primary,
.csub-btn-primary:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 26px;
    border: 1px solid #0a3a6e;
    border-radius: 4px;
    background: #0a3a6e;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.csub-btn-primary:hover,
.csub-btn-primary:focus,
.csub-btn-primary:active { background: #072b52; border-color: #072b52; color: #fff !important; }
.csub-btn-primary[disabled],
.csub-btn-primary.disabled {
    opacity: .5;
    pointer-events: none;
}
.csub-btn-ghost,
.csub-btn-ghost:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 26px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #4a5a6a !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.csub-btn-ghost:hover,
.csub-btn-ghost:focus { background: #f4f7fa; color: #1f2d3d !important; }
.csub-btn-ghost.disabled { opacity: .5; pointer-events: none; }
.csub-btn-block { width: 100%; }

/* ---- Forms ----------------------------------------------------------------- */
.csub-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}
.csub-form .form-group { margin-bottom: 16px; }
.csub-form .form-control {
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: none;
}
.csub-form .form-control:focus {
    border-color: #0a3a6e;
    box-shadow: 0 0 0 3px rgba(10, 58, 110, 0.12);
}
.csub-required::after { content: "*"; color: #d9534f; margin-left: 3px; }
.csub-form .field-validation-error,
.csub-form label.error,
.csub-err {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #d9534f;
}
.csub-input-invalid {
    border-color: #d9534f !important;
    background-color: #fdf3f3 !important;
}

/* ---- Info / secure notes ---------------------------------------------------- */
.csub-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #d6e4f5;
    border-radius: 6px;
    background: #f2f7fd;
    color: #0a3a6e;
    font-size: 12px;
    line-height: 1.5;
}
.csub-note > .fa { margin-top: 1px; }
.csub-note-success {
    border-color: #b1dfbb;
    background: #f0f9f2;
    color: #1e7e34;
}
.csub-note-warning {
    border-color: #f5d9a8;
    background: #fdf8ee;
    color: #8a6d3b;
}

/* ---- Plan cards -------------------------------------------------------------- */
.csub-plan-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
}
.csub-plan-card {
    position: relative;
    flex: 0 1 280px;
    min-width: 250px;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.csub-plan-card:hover {
    border-color: #9db6d3;
    box-shadow: 0 4px 12px rgba(16, 33, 60, 0.10);
}
.csub-plan-card.selected-plan {
    border: 2px solid #0a3a6e;
    box-shadow: 0 6px 18px rgba(10, 58, 110, 0.18);
}
.csub-plan-card.selected-plan::after {
    content: "\2713";
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #0a3a6e;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}
.csub-plan-name {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2d3d;
}
.csub-plan-desc {
    min-height: 34px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
}
.csub-plan-price {
    margin: 8px 0 2px;
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}
.csub-plan-price small {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.csub-plan-cycle {
    margin-bottom: 12px;
    font-size: 11px;
    color: #64748b;
}
.csub-plan-features {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}
.csub-plan-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.4;
    color: #334155;
}
.csub-plan-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #0a3a6e;
    font-weight: 700;
}

/* ---- Billing cycle toggle ----------------------------------------------------- */
.csub-cycle-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.csub-cycle-toggle .csub-cycle-btn {
    padding: 5px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.csub-cycle-toggle .csub-cycle-btn:hover { background: #eef2f7; color: #1f2d3d; }
.csub-cycle-toggle .csub-cycle-btn.active {
    background: #0a3a6e;
    border-color: #0a3a6e;
    color: #fff;
    box-shadow: 0 1px 2px rgba(10, 58, 110, 0.3);
}

/* ---- Extension configurator ----------------------------------------------------- */
.csub-qty {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}
.csub-qty .csub-qty-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #fff;
    color: #1f2d3d;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}
.csub-qty .csub-qty-btn:hover { background: #eef2f7; }
.csub-qty input {
    width: 84px;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1f2d3d;
    background: #fff;
}
.csub-rate-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 6px;
    background: #0a3a6e;
    color: #fff;
}
.csub-rate-banner label {
    display: block;
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.csub-rate-banner .csub-rate-value {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.csub-rate-banner .csub-rate-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.65);
}
.csub-terms {
    margin: 14px 0 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.6;
    color: #4a5a6a;
}

/* ---- Order summary (billing page) ---------------------------------------------- */
.csub-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
}
.csub-summary-row span { color: #64748b; }
.csub-summary-row strong { color: #1f2d3d; }
.csub-summary-divider {
    border: 0;
    border-top: 1px dashed #e4e8ee;
    margin: 14px 0;
}
.csub-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #0a3a6e;
}
.csub-summary-total strong { font-size: 20px; }

/* ---- Card-brand badges (billing) ------------------------------------------------- */
.csub-brand-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}
.csub-brand-visa       { background: #eef4fd; color: #1d4ed8; border: 1px solid #c9dcf8; }
.csub-brand-mastercard { background: #fff5ec; color: #c2410c; border: 1px solid #f8d8bd; }
.csub-brand-amex       { background: #f0f9f2; color: #1e7e34; border: 1px solid #b1dfbb; }
.csub-brand-discover   { background: #f8f4fc; color: #7e22ce; border: 1px solid #e5d3f5; }

/* ---- My Subscriptions product cards ---------------------------------------------- */
.csub-product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.csub-product-card {
    position: relative;
    flex: 1 1 300px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 22px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.06);
    transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.csub-product-card:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px rgba(16, 33, 60, 0.10);
}
.csub-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}
.csub-product-cs::before { background: #2563eb; }
.csub-product-ps::before { background: #059669; }
.csub-product-gs::before { background: #7c3aed; }

.csub-product-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.csub-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    font-size: 20px;
}
.csub-product-cs .csub-product-icon { background: #eef4fd; color: #2563eb; }
.csub-product-ps .csub-product-icon { background: #ecf9f3; color: #059669; }
.csub-product-gs .csub-product-icon { background: #f6f2fd; color: #7c3aed; }

.csub-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #d4edda;
    color: #1e7e34;
    border: 1px solid #b1dfbb;
}
.csub-pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #28a745;
    animation: csub-pulse 2s infinite;
}
@keyframes csub-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
    70%  { box-shadow: 0 0 0 6px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.csub-product-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2d3d;
}
.csub-product-card > p {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.55;
    color: #64748b;
}
.csub-product-foot { margin-top: auto; }
.csub-product-btn,
.csub-product-btn:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s ease;
}
.csub-product-btn .fa { transition: transform .15s ease; }
.csub-product-btn:hover .fa { transform: translateX(3px); }
.csub-product-cs .csub-product-btn { background: #2563eb; }
.csub-product-cs .csub-product-btn:hover { background: #1d4ed8; color: #fff !important; }
.csub-product-ps .csub-product-btn { background: #059669; }
.csub-product-ps .csub-product-btn:hover { background: #047857; color: #fff !important; }
.csub-product-gs .csub-product-btn { background: #7c3aed; }
.csub-product-gs .csub-product-btn:hover { background: #6d28d9; color: #fff !important; }

/* ---- Empty state ------------------------------------------------------------------ */
.csub-empty-state {
    max-width: 520px;
    margin: 36px auto 0;
    padding: 44px 24px;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.06);
}
.csub-empty-state .csub-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fdf8ee;
    color: #c8891a;
    font-size: 22px;
}
.csub-empty-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2d3d;
}
.csub-empty-state p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.55;
}

/* ==========================================================================
   Public registration page (standalone layout — no app chrome)
   ========================================================================== */
.csub-reg-body {
    margin: 0;
    min-height: 100vh;
    background: #f4f7fa;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    color: #1f2d3d;
}
.csub-reg-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid #e4e8ee;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.05);
}
.csub-reg-topbar img { height: 30px; width: auto; }
.csub-reg-topbar .csub-reg-pill {
    display: none;
    align-items: center;
    gap: 8px;
    max-width: 620px;
    padding: 5px 16px;
    border: 1px solid #d6e4f5;
    border-radius: 999px;
    background: #f2f7fd;
    color: #0a3a6e;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}
.csub-reg-signin {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
}
.csub-reg-signin a {
    margin-left: 6px;
    color: #0a3a6e;
    font-weight: 600;
    text-decoration: none;
}
.csub-reg-signin a:hover { text-decoration: underline; color: #072b52; }

.csub-reg-main {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1180px;
    margin: 26px auto 34px;
    padding: 0 20px;
}
.csub-reg-pitch { flex: 1 1 46%; padding-top: 8px; }
.csub-reg-kicker {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0a3a6e;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.csub-reg-pitch h1 {
    margin: 0 0 14px;
    font-size: 34px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.csub-reg-pitch .csub-reg-lead {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #64748b;
}
.csub-checklist {
    display: flex;
    gap: 30px;
    margin: 0 0 22px;
}
.csub-checklist ul {
    flex: 1;
    margin: 0;
    padding: 0;
    list-style: none;
}
.csub-checklist li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #334155;
}
.csub-checklist li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #0a3a6e;
    font-weight: 700;
}

/* Sample analysis preview card (left pitch panel) */
.csub-sample-card {
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(16, 33, 60, 0.06);
}
.csub-sample-card h4 {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #1f2d3d;
}
.csub-sample-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.csub-sample-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    background: #0a3a6e;
}
.csub-sample-head strong { display: block; font-size: 13px; color: #1f2d3d; }
.csub-sample-head .csub-sample-sub { font-size: 12px; color: #64748b; }
.csub-sample-tag {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.csub-tag-danger  { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.csub-tag-success { background: #d4edda; color: #1e7e34; border: 1px solid #b1dfbb; }
.csub-tag-info    { background: #e7f1fb; color: #1e40af; border: 1px solid #c9dcf8; }
.csub-sample-meta {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    padding-top: 12px;
    border-top: 1px solid #eef0f3;
    font-size: 12px;
    color: #4a5a6a;
}
.csub-sample-note {
    padding: 10px 12px;
    border-radius: 6px;
    background: #f4f7fa;
    font-size: 12px;
    line-height: 1.5;
    color: #334155;
}
.csub-sample-note + .csub-sample-note { margin-top: 8px; }
.csub-sample-note.csub-sample-action {
    background: #f0f9f2;
    color: #1e7e34;
}

/* Right panel — the form itself */
.csub-reg-formcard {
    flex: 1 1 54%;
    background: #fff;
    border: 1px solid #e4e8ee;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(16, 33, 60, 0.08);
}
.csub-reg-formcard h2 {
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f3;
    font-size: 20px;
    font-weight: 700;
    color: #1f2d3d;
}

/* Connector selection */
.csub-connector-row { display: flex; gap: 14px; }
.csub-connector {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 600;
    font-size: 13px;
    color: #334155;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.csub-connector:hover { border-color: #9db6d3; }
.csub-connector input[type="radio"] { width: 15px; height: 15px; margin: 0; }
.csub-connector img { max-height: 26px; max-width: 96px; }
.csub-connector.csub-connector-selected {
    border-color: #0a3a6e;
    box-shadow: 0 0 0 3px rgba(10, 58, 110, 0.12);
}

/* Captcha row */
.csub-captcha-img {
    display: inline-block;
    border: 1px solid #e4e8ee;
    border-radius: 4px;
    overflow: hidden;
    vertical-align: middle;
}
.csub-captcha-refresh {
    margin-left: 8px;
    color: #0a3a6e;
    font-size: 15px;
    cursor: pointer;
    vertical-align: middle;
}
.csub-captcha-refresh:hover { color: #072b52; }

/* Registration page loader (standalone page provides its own #pageloaddiv) */
.csub-reg-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.7);
}

/* ---- Responsive -------------------------------------------------------------------- */
@media (min-width: 992px) {
    .csub-reg-topbar .csub-reg-pill { display: inline-flex; }
}
@media (max-width: 991px) {
    .csub-reg-main { flex-direction: column; }
    .csub-reg-pitch, .csub-reg-formcard { flex: 1 1 100%; width: 100%; }
    .csub-reg-pitch h1 { font-size: 28px; }
}
@media (max-width: 767px) {
    .csub-reg-topbar { padding: 0 16px; }
    .csub-reg-main { margin-top: 16px; }
    .csub-checklist { flex-direction: column; gap: 0; }
    .csub-connector-row { flex-direction: column; }
    .csub-plan-card { flex-basis: 100%; }
    .csub-steps .csub-steps-note { display: none; }
    .csub-product-card { max-width: none; }
}
