/* ═══════════════════════════════════════════════════════════════
   subscriptions-new.php — card redesign + compare-plans module
   Loaded AFTER subscriptions.css: only overrides/extends what changed
   (plan cards, features list, CTA area) and adds the new compare UI.
   Page chrome (intro, current-plan card, modals, trust strip) is
   untouched and still comes from subscriptions.css.
   ═══════════════════════════════════════════════════════════════ */

/* ── Plans section header: title + Compare button side by side ── */
.plans-section-header--with-action {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-compare-launch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #e93314;
    background: #fff;
    color: #e93314;
    font-size: .85rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.btn-compare-launch:hover {
    background: #e93314;
    color: #fff;
}

/* ── Redesigned plan card ── */
.plan-card {
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 4px 20px rgba(20,20,40,.05);
}
.plan-card:hover {
    box-shadow: 0 18px 44px rgba(233,51,20,.14);
}

.plan-card-head {
    padding: 26px 26px 16px;
}
.plan-card-name {
    font-size: 1.25rem;
    letter-spacing: -.2px;
}

/* Price block gets a touch more air and a soft divider */
.plan-price-section {
    padding: 4px 26px 20px;
}
.plan-price-row .pv { font-size: 2.6rem; }

/* ── Features list: available-only, chip-style rows ──
   The card's equal-height behavior does NOT come from equal list
   length anymore (lists are now different lengths per plan) — it comes
   entirely from .plan-features-section{flex:1} inside a flex-column
   .plan-card sitting in a CSS grid row with align-items:stretch
   (both already set in subscriptions.css). A short list just leaves
   quiet space above the CTA instead of stretching itself. */
.plan-features-section {
    padding: 8px 26px 22px;
    display: flex;
    flex-direction: column;
}
.features-eyebrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #999;
    margin-bottom: 14px;
}
.features-count {
    font-size: .68rem;
    font-weight: 700;
    color: #e93314;
    background: #fdeceb;
    padding: 2px 9px;
    border-radius: 20px;
    letter-spacing: 0;
    text-transform: none;
}
.plan-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.plan-features-list li {
    border-bottom: none;
    padding: 5px 0;
}
.plan-features-list li.feat-yes {
    color: #2f2f3a;
    font-weight: 500;
}
.feat-yes .feat-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #e8f8ed;
    color: #28a745;
    font-size: .62rem;
    flex-shrink: 0;
}
.feat-empty {
    color: #bbb;
    font-size: .82rem;
    font-style: italic;
    padding: 5px 0;
}

/* ── CTA area: subscribe button + compare toggle stacked ── */
.plan-cta-section {
    padding: 4px 26px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.btn-plan-cta {
    border-radius: 12px;
}
.btn-compare-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    border: none;
    color: #999;
    font-size: .78rem;
    font-weight: 600;
    padding: 6px 4px;
    cursor: pointer;
    transition: color .2s ease;
}
.btn-compare-toggle:hover { color: #e93314; }
.btn-compare-toggle.is-selected { color: #e93314; }
.btn-compare-toggle.is-selected i { color: #e93314; }

/* ═══════════════════════════════════════════════════════════════
   Floating compare bar
   ═══════════════════════════════════════════════════════════════ */
.compare-bar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 1200;
    background: #1a1a2e;
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0,0,0,.28);
    padding: 14px 18px;
    width: min(560px, calc(100% - 32px));
}
.compare-bar[hidden] { display: none; }
.compare-bar__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.compare-bar__slots {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.compare-bar__slot {
    flex: 1;
    min-width: 0;
    background: rgba(255,255,255,.08);
    border: 1px dashed rgba(255,255,255,.25);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: .82rem;
}
.compare-bar__slot-empty { color: rgba(255,255,255,.45); }
.compare-bar__slot-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}
.compare-bar__slot-name small { font-weight: 400; opacity: .6; }
.compare-bar__slot-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.compare-bar__slot-remove:hover { color: #fff; }
.compare-bar__vs {
    font-size: .7rem;
    font-weight: 700;
    color: rgba(255,255,255,.4);
    flex-shrink: 0;
}
.compare-bar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.compare-bar__clear {
    background: none;
    border: none;
    color: rgba(255,255,255,.6);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 6px;
}
.compare-bar__clear:hover { color: #fff; }
.compare-bar__go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e93314;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.compare-bar__go:hover:not(:disabled) { background: #c82800; }
.compare-bar__go:disabled { background: rgba(255,255,255,.15); color: rgba(255,255,255,.4); cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════
   Compare modal
   ═══════════════════════════════════════════════════════════════ */
.compare-modal {
    position: fixed;
    inset: 0;
    background: rgba(10,10,20,.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.compare-modal__dialog {
    background: #fff;
    border-radius: 18px;
    max-width: 720px;
    width: 100%;
    max-height: 86vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.compare-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f3f6;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #666;
    font-size: .9rem;
    cursor: pointer;
    z-index: 2;
}
.compare-modal__close:hover { background: #eee; color: #333; }
.compare-modal__head {
    padding: 28px 28px 8px;
    text-align: center;
}
.compare-modal__head h4 { margin: 0 0 4px; font-weight: 800; color: #1a1a2e; }
.compare-modal__head p { margin: 0; color: #999; font-size: .85rem; }
.compare-modal__body { padding: 16px 20px 28px; overflow-x: auto; }

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}
.compare-table thead th {
    padding: 14px 12px 18px;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    vertical-align: bottom;
}
.compare-table thead th:first-child { width: 40%; }
.cm-current-tag {
    display: inline-block;
    background: #28a745;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 2px 9px;
    border-radius: 20px;
    margin-bottom: 6px;
}
.cm-plan-name { font-size: 1.05rem; font-weight: 800; color: #1a1a2e; }
.cm-plan-cycle { font-size: .72rem; color: #aaa; font-weight: 600; text-transform: uppercase; margin: 2px 0 6px; }
.cm-plan-price { font-size: 1.15rem; font-weight: 900; color: #e93314; }

.compare-table tbody tr:nth-child(odd) { background: #fafafa; }
.compare-table td { padding: 10px 12px; font-size: .84rem; }
.cm-feature-name { color: #444; font-weight: 500; }
.cm-check { text-align: center; }
.cm-yes { color: #28a745; }
.cm-no { color: #e0e0e0; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .plan-card-head, .plan-price-section, .plan-features-section, .plan-cta-section {
        padding-left: 20px;
        padding-right: 20px;
    }
    .compare-bar { bottom: 12px; padding: 12px 14px; }
    .compare-bar__slots { flex-direction: column; align-items: stretch; }
    .compare-bar__vs { display: none; }
    .compare-bar__inner { flex-direction: column; align-items: stretch; }
    .compare-bar__actions { justify-content: space-between; }
    .compare-table thead th { padding: 10px 6px 14px; }
    .compare-table td { padding: 8px 6px; font-size: .78rem; }
}
