/* ── CortexHub Subscriptions v3.0 ─────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════════════════
   FULL-SCREEN ARTICLE PROMPT MODAL
   Outputs in wp_footer as direct child of body — position:fixed always works
   ════════════════════════════════════════════════════════════════════════════ */
#chs-article-prompt {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #06061a;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#chs-article-prompt.chs-prompt-visible {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: chs-fadein .3s ease forwards;
}
@keyframes chs-fadein { from { opacity:0 } to { opacity:1 } }

.chs-prompt-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.chs-prompt-orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.chs-prompt-orb--1 { width:500px;height:500px;background:rgba(99,102,241,.22);top:-100px;right:-100px; }
.chs-prompt-orb--2 { width:380px;height:380px;background:rgba(16,185,129,.14);bottom:-80px;left:-80px; }
.chs-prompt-orb--3 { width:260px;height:260px;background:rgba(245,158,11,.09);bottom:20%;right:10%; }

.chs-prompt-inner {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
    margin: auto; padding: 3rem 2rem 2.5rem;
    text-align: center;
}
.chs-prompt-close {
    position: fixed; top: 20px; right: 20px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.55); font-size: 15px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all .2s; z-index: 2; padding: 0; line-height: 1;
}
.chs-prompt-close:hover { background:rgba(255,255,255,.18); color:#fff; }
.chs-prompt-eyebrow {
    display: inline-block;
    background: rgba(99,102,241,.18); border: 1px solid rgba(99,102,241,.4);
    color: #a5b4fc; font-size: 11px; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 20px; margin-bottom: 1.25rem;
}
.chs-prompt-title {
    font-size: 38px; font-weight: 800; color: #fff;
    line-height: 1.1; letter-spacing: -.03em; margin: 0 0 1rem;
}
@media (max-width:480px) { .chs-prompt-title { font-size:28px } }
.chs-prompt-body {
    font-size: 15px; line-height: 1.75; color: rgba(255,255,255,.6);
    margin: 0 auto 1.5rem; max-width: 360px;
}
.chs-prompt-body strong { color:#fff; font-weight:600; }
.chs-prompt-perks { display:flex; flex-direction:column; align-items:center; gap:10px; margin-bottom:2rem; }
.chs-prompt-perk { font-size:14px; color:rgba(255,255,255,.65); display:flex; align-items:center; gap:8px; }
.chs-prompt-perk-icon { font-size:18px; }
.chs-prompt-cta {
    display: block; width:100%; max-width:320px; margin:0 auto 12px;
    background:#fff; color:#111827 !important; text-decoration:none !important;
    font-size:15px; font-weight:700; padding:15px 32px; border-radius:12px;
    letter-spacing:-.01em; transition:transform .15s,box-shadow .15s;
    box-shadow:0 4px 24px rgba(255,255,255,.18);
}
.chs-prompt-cta:hover { transform:translateY(-2px); box-shadow:0 8px 32px rgba(255,255,255,.28); color:#111827 !important; }
.chs-prompt-login {
    display:block; font-size:13px; color:rgba(255,255,255,.4) !important;
    text-decoration:underline !important; margin-bottom:1.25rem;
}
.chs-prompt-login:hover { color:rgba(255,255,255,.7) !important; }
.chs-prompt-note { font-size:12px; color:rgba(255,255,255,.22); margin:0; }


/* ════════════════════════════════════════════════════════════════════════════
   APPLE-LEVEL PRICING PAGE
   ════════════════════════════════════════════════════════════════════════════ */
.chs-pricing {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1100px; margin: 0 auto; padding: 0 1.25rem 5rem;
    color: #1d1d1f;
}
.chs-pricing__hero { text-align:center; padding:5rem 0 4rem; }
.chs-pricing__kicker {
    display:inline-block; font-size:12px; font-weight:600;
    letter-spacing:.1em; text-transform:uppercase; color:#6366f1; margin-bottom:1rem;
}
.chs-pricing__headline {
    font-size: clamp(36px,6vw,64px); font-weight:800; letter-spacing:-.04em;
    line-height:1.05;
    background:linear-gradient(135deg,#1d1d1f 0%,#444 100%);
    -webkit-background-clip:text; -webkit-text-fill-color:transparent;
    background-clip:text; margin:0 0 1.25rem;
}
.chs-pricing__sub { font-size:17px; color:#6e6e73; margin:0 0 2rem; }
.chs-billing-toggle {
    display:inline-flex; background:#f5f5f7; border-radius:50px; padding:4px; gap:2px;
}
.chs-toggle {
    padding:8px 20px; font-size:14px; font-weight:500; border:none;
    background:transparent; border-radius:50px; cursor:pointer; color:#6e6e73; transition:all .2s;
}
.chs-toggle.active {
    background:#fff; color:#1d1d1f; font-weight:600;
    box-shadow:0 1px 6px rgba(0,0,0,.12);
}

/* Plan cards */
.chs-pricing__plans { display:grid; grid-template-columns:repeat(3,1fr); gap:20px; margin-bottom:5rem; }
.chs-plan-card { position:relative; border-radius:24px; padding:2rem 1.75rem; display:flex; flex-direction:column; transition:transform .2s,box-shadow .2s; }
.chs-plan-card:hover { transform:translateY(-4px); }
.chs-plan-card--free { background:#f5f5f7; border:1.5px solid #e5e5ea; }
.chs-plan-card--pro {
    background:linear-gradient(160deg,#0f0f2e 0%,#1e1b4b 100%);
    border:1.5px solid rgba(99,102,241,.4);
    box-shadow:0 8px 40px rgba(99,102,241,.25),0 0 0 1px rgba(99,102,241,.15);
    color:#fff;
}
.chs-plan-card--creator { background:#0a0a0a; border:1.5px solid #2a2a2a; color:#fff; box-shadow:0 8px 40px rgba(0,0,0,.35); }

.chs-plan-card__badge {
    position:absolute; top:-13px; left:50%; transform:translateX(-50%);
    background:linear-gradient(90deg,#6366f1,#8b5cf6);
    color:#fff; font-size:12px; font-weight:700;
    padding:4px 16px; border-radius:20px; white-space:nowrap; letter-spacing:.04em;
}
.chs-plan-card__top { margin-bottom:1.5rem; }
.chs-plan-card__label {
    display:block; font-size:13px; font-weight:600; letter-spacing:.06em;
    text-transform:uppercase; margin-bottom:1rem;
}
.chs-plan-card--free .chs-plan-card__label { color:#6e6e73; }
.chs-plan-card--pro .chs-plan-card__label { color:#a5b4fc; }
.chs-plan-card--creator .chs-plan-card__label { color:#9ca3af; }

.chs-plan-card__price-wrap { display:flex; align-items:baseline; gap:2px; margin-bottom:.75rem; }
.chs-plan-card__amount { font-size:52px; font-weight:800; letter-spacing:-.04em; line-height:1; }
.chs-plan-card--free .chs-plan-card__amount { color:#1d1d1f; }
.chs-plan-card__period { font-size:15px; }
.chs-plan-card--free .chs-plan-card__period { color:#9ca3af; }
.chs-plan-card--pro .chs-plan-card__period,
.chs-plan-card--creator .chs-plan-card__period { color:rgba(255,255,255,.45); }

.chs-plan-card__desc { font-size:14px; line-height:1.6; }
.chs-plan-card--free .chs-plan-card__desc { color:#6e6e73; }
.chs-plan-card--pro .chs-plan-card__desc,
.chs-plan-card--creator .chs-plan-card__desc { color:rgba(255,255,255,.6); }

.chs-plan-card__features { list-style:none; padding:0; margin:0 0 1.4rem; display:flex; flex-direction:column; gap:9px; flex:1; }
.chs-plan-card__features li { font-size:14px; display:flex; align-items:flex-start; gap:8px; }
.chs-plan-card--free .chs-plan-card__features li { color:#3a3a3c; }
.chs-plan-card--pro .chs-plan-card__features li,
.chs-plan-card--creator .chs-plan-card__features li { color:rgba(255,255,255,.8); }
.chs-plan-card__features li.yes::before { content:'✓'; font-weight:800; flex-shrink:0; margin-top:1px; }
.chs-plan-card--free .chs-plan-card__features li.yes::before { color:#059669; }
.chs-plan-card--pro .chs-plan-card__features li.yes::before,
.chs-plan-card--creator .chs-plan-card__features li.yes::before { color:#6ee7b7; }
.chs-plan-card__features li.no::before { content:'—'; color:rgba(0,0,0,.2); flex-shrink:0; }

.chs-plan-card__btn {
    display:block; width:100%; padding:13px 0; font-size:15px; font-weight:600;
    border-radius:12px; border:none; cursor:pointer; text-align:center;
    transition:all .2s; letter-spacing:-.01em; margin-top:auto;
}
.chs-plan-card--free .chs-plan-card__btn { background:#e5e5ea; color:#6e6e73; cursor:default; }
.chs-plan-card__btn--primary {
    background:linear-gradient(135deg,#6366f1,#8b5cf6);
    color:#fff !important; box-shadow:0 4px 16px rgba(99,102,241,.45);
}
.chs-plan-card__btn--primary:hover { box-shadow:0 6px 24px rgba(99,102,241,.6); transform:translateY(-1px); }
.chs-plan-card__btn--dark { background:#fff; color:#0a0a0a !important; box-shadow:0 2px 8px rgba(255,255,255,.15); }
.chs-plan-card__btn--dark:hover { box-shadow:0 4px 16px rgba(255,255,255,.3); transform:translateY(-1px); }
.chs-plan-card__btn:disabled { opacity:.5; cursor:default; transform:none !important; box-shadow:none !important; }
.chs-plan-card__billing { font-size:12px; text-align:center; margin-top:10px; }
.chs-plan-card--free .chs-plan-card__billing { color:#9ca3af; }
.chs-plan-card--pro .chs-plan-card__billing,
.chs-plan-card--creator .chs-plan-card__billing { color:rgba(255,255,255,.3); }

/* Comparison table */
.chs-pricing__compare { margin-bottom:5rem; }
.chs-pricing__compare-title { text-align:center; font-size:28px; font-weight:700; letter-spacing:-.02em; margin-bottom:2rem; color:#1d1d1f; }
.chs-pricing__table { border:1px solid #e5e5ea; border-radius:16px; overflow:hidden; }
.chs-pricing__table-head {
    display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
    background:#f5f5f7; padding:.75rem 1.25rem;
    font-size:13px; font-weight:700; color:#6e6e73; text-align:center;
}
.chs-pricing__table-head div:first-child { text-align:left; }
.chs-pricing__table-row {
    display:grid; grid-template-columns:2fr 1fr 1fr 1fr;
    padding:.85rem 1.25rem; border-top:1px solid #f0f0f0;
    font-size:14px; text-align:center; align-items:center;
    transition:background .1s;
}
.chs-pricing__table-row:hover { background:#fafafa; }
.chs-pricing__table-feat { text-align:left; color:#3a3a3c; font-weight:500; }
.chs-pricing__table-row div:not(.chs-pricing__table-feat) { color:#6e6e73; }

/* FAQ */
.chs-pricing__faq { margin-bottom:4rem; }
.chs-pricing__faq-title { text-align:center; font-size:28px; font-weight:700; letter-spacing:-.02em; margin-bottom:2rem; color:#1d1d1f; }
.chs-pricing__faq-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.chs-faq-item { background:#f5f5f7; border-radius:16px; padding:1.5rem; }
.chs-faq-item h4 { font-size:15px; font-weight:700; color:#1d1d1f; margin:0 0 .5rem; }
.chs-faq-item p  { font-size:14px; color:#6e6e73; line-height:1.6; margin:0; }

/* Status message */
.chs-msg { padding:13px 16px; border-radius:10px; font-size:14px; margin-top:1.5rem; text-align:center; }
.chs-msg--success { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; }
.chs-msg--error   { background:#fef2f2; color:#991b1b; border:1px solid #fca5a5; }


/* ════════════════════════════════════════════════════════════════════════════
   COMMUNITY MONETIZE PANEL
   Uses cortexhub-platform's own CSS vars so it blends perfectly:
   --ink2, --wire, --wire2, --spark, --snow, --fog, --mist, --r, --r3, --font
   ════════════════════════════════════════════════════════════════════════════ */
#chs-monetize-panel {
    /* Inherits .csc-sidebar-card styles from the platform template */
    /* Additional overrides for our form elements */
}
#chs-monetize-panel .csc-panel-head {
    /* Uses platform's existing .csc-panel-head styling */
}
#chs-monetize-panel input[type="text"],
#chs-monetize-panel input[type="number"],
#chs-monetize-panel textarea,
#chs-monetize-panel select {
    background: var(--ink, #0d0f14);
    border: 1px solid var(--wire2, rgba(255,255,255,.1));
    border-radius: var(--r, 10px);
    color: var(--snow, #eef0ff);
    font-family: var(--font, system-ui, sans-serif);
    font-size: .82rem;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    width: 100%;
    padding: 9px 12px;
}
#chs-monetize-panel input[type="text"]:focus,
#chs-monetize-panel input[type="number"]:focus,
#chs-monetize-panel textarea:focus,
#chs-monetize-panel select:focus {
    border-color: var(--spark, #7c6df4);
    box-shadow: 0 0 0 3px var(--spark-glow, rgba(124,109,244,.2));
}
#chs-monetize-panel input::placeholder,
#chs-monetize-panel textarea::placeholder {
    color: var(--fog, #4e5668);
}
#chs-monetize-panel textarea { resize: vertical; min-height: 52px; }
#chs-monetize-panel select {
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234e5668' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
    cursor: pointer;
}
#chs-monetize-panel .chs-paid-fields {
    gap: 6px;
    /* display set by JS — flex when paid, none when free */
}
#chs-monetize-panel .chs-paid-fields input,
#chs-monetize-panel .chs-paid-fields select {
    flex: 1;
    width: auto;
}
#chs-monetize-panel label {
    color: var(--mist, #8892a4);
    font-size: .8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Save button — uses platform's .csc-btn .csc-btn--primary */
#chs-monetize-panel .chs-btn-save-plan {
    width: 100%;
    justify-content: center;
    margin-top: 2px;
}
/* Delete plan row button */
#chs-monetize-panel .chs-btn-delete-plan {
    background: none;
    border: none;
    color: var(--red, #ef4444);
    cursor: pointer;
    font-size: .76rem;
    padding: 3px 7px;
    border-radius: 5px;
    transition: background .12s;
    font-family: var(--font, inherit);
}
#chs-monetize-panel .chs-btn-delete-plan:hover {
    background: rgba(239,68,68,.1);
}


/* ════════════════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ════════════════════════════════════════════════════════════════════════════ */
.chs-loading-overlay {
    display: none; position:fixed; inset:0;
    background:rgba(0,0,0,.55); z-index:999998;
    align-items:center; justify-content:center; flex-direction:column; gap:16px;
}
.chs-loading-overlay.active { display:flex; }
.chs-spinner {
    width:44px; height:44px;
    border:3px solid rgba(255,255,255,.2); border-top-color:#fff;
    border-radius:50%; animation:chs-spin .75s linear infinite;
}
.chs-loading-text { color:#fff; font-size:14px; font-weight:500; }
@keyframes chs-spin { to { transform:rotate(360deg) } }


/* ════════════════════════════════════════════════════════════════════════════
   ACCOUNT & CREATOR DASHBOARDS
   ════════════════════════════════════════════════════════════════════════════ */
.chs-account-wrap, .chs-creator-dash { font-size:14px; line-height:1.6; }
.chs-account-plan {
    margin-bottom:1.25rem; font-size:14px; padding:12px 16px;
    background:#f9fafb; border:1px solid #e5e7eb; border-radius:9px;
}
.chs-sub-active    { color:#059669; font-weight:600; }
.chs-sub-cancelled { color:#dc2626; }
.chs-creator-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin:1rem 0; }
.chs-stat { background:#f9fafb; border:1px solid #e5e7eb; border-radius:9px; padding:.9rem; }
.chs-stat-label { font-size:11px; color:#9ca3af; display:block; margin-bottom:4px; text-transform:uppercase; letter-spacing:.05em; }
.chs-stat-value { font-size:22px; font-weight:700; color:#111827; }
.chs-connected-badge { color:#059669; font-size:13px; font-weight:600; }
.chs-payout-setup { margin-top:1.5rem; }
.chs-payout-setup h4 { font-size:14px; font-weight:600; margin-bottom:.75rem; }
.chs-payout-setup > div { margin-bottom:1rem; }
.chs-paystack-subaccount-form input {
    display:block; width:100%; padding:9px 12px; margin-bottom:8px;
    border:1px solid #e5e7eb; border-radius:7px; font-size:13px;
}
.chs-member-badge { color:#34d399; font-size:12px; font-weight:600; }

/* Community plans widget (for shortcode use) */
.chs-community-plans { display:flex; flex-direction:column; gap:8px; }
.chs-comm-plan { border:1px solid rgba(255,255,255,.1); border-radius:10px; padding:.85rem 1rem; font-size:13px; }
.chs-comm-plan strong { font-size:14px; font-weight:600; }
.chs-comm-plan p { margin:4px 0 10px; font-size:13px; opacity:.7; }
.chs-join-btn {
    padding:8px 18px; font-size:13px; font-weight:600; border-radius:7px;
    background:#4f46e5; color:#fff; border:none; cursor:pointer;
}
.chs-join-btn:hover { opacity:.85; }


/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════════════════ */
@media (max-width:900px) {
    .chs-pricing__plans { grid-template-columns:1fr; max-width:420px; margin-left:auto; margin-right:auto; }
    .chs-pricing__faq-grid { grid-template-columns:1fr; }
    .chs-pricing__table-head,
    .chs-pricing__table-row { grid-template-columns:2fr 1fr 1fr 1fr; font-size:12px; padding:.75rem; }
}
@media (max-width:600px) {
    .chs-pricing__hero { padding:3rem 0 2.5rem; }
    .chs-creator-stats { grid-template-columns:repeat(2,1fr); }
    .chs-billing-toggle { flex-wrap:wrap; justify-content:center; }
    .chs-prompt-inner { padding:2rem 1.25rem; }
    #chs-monetize-panel .chs-paid-fields { flex-direction:column; }
}
