/* Futures Plans Showcase — black theme, sticky first column, drag scrub bar */

.fps-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #f5f5f5;
    border-radius: 14px;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
}
.fps-wrapper * { box-sizing: border-box; }

.fps-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.fps-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}
.fps-count {
    color: #fb923c;
    font-weight: 700;
    margin-left: 4px;
}
.fps-hint {
    font-size: 12px;
    color: #8a8a8a;
    letter-spacing: 0.02em;
}

/* Scrub track — a draggable proxy for the table's horizontal scroll,
   same idea as a slim gradient scrollbar. */
.fps-scrub-track {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: #1c1c1c;
    margin-bottom: 16px;
    cursor: pointer;
    overflow: hidden;
}
.fps-scrub-thumb {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    min-width: 40px;
    border-radius: 999px;
    background: linear-gradient(90deg, #fb923c 0%, #ec4899 55%, #a855f7 100%);
    cursor: grab;
}
.fps-scrub-thumb:active { cursor: grabbing; }

.fps-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    user-select: none;
}
.fps-scroll::-webkit-scrollbar { display: none; }
.fps-scroll.fps-dragging { cursor: grabbing; }

.fps-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 1420px;
}

.fps-table th, .fps-table td {
    padding: 14px 16px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid #1f1f1f;
}

/* Free-text cells (payout window, consistency rule) run long and used to
   force the whole table wider with no cap, pushing the text past the
   visible/scroll area. Wrap them inside a fixed-width column instead.
   Selector needs .fps-table td.fps-wrap (not just .fps-wrap) to out-rank
   the ".fps-table td { white-space: nowrap }" rule above — a bare class
   selector has lower specificity than "class + element" and was silently
   losing the cascade. */
.fps-table td.fps-wrap {
    white-space: normal;
    text-align: left;
    min-width: 240px;
    max-width: 280px;
    line-height: 1.4;
    word-break: break-word;
}

.fps-table thead th {
    background: #0d0d0d;
    color: #9a9a9a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    border-bottom: 1px solid #262626;
}

.fps-table tbody tr:hover td { background: #0c0c0c; }

/* Click-to-sort headers — wired up by script.js against th[data-sort-key] */
.fps-table thead th.fps-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}
.fps-table thead th.fps-sortable:hover { color: #d4d4d4; }
.fps-table thead th.fps-sortable::after {
    content: '↕';
    position: absolute;
    right: 6px;
    opacity: 0.35;
    font-size: 10px;
}
.fps-table thead th.fps-sortable.fps-sort-asc::after {
    content: '↑';
    opacity: 1;
    color: #fb923c;
}
.fps-table thead th.fps-sortable.fps-sort-desc::after {
    content: '↓';
    opacity: 1;
    color: #fb923c;
}

/* Sticky first column — the frozen part of the "slider".
   Same specificity fix as .fps-wrap above: needs .fps-table td.fps-sticky
   to beat ".fps-table td { white-space: nowrap }", otherwise the plan
   name/subtitle never wraps and bleeds across the columns to its right. */
.fps-table td.fps-sticky, .fps-table th.fps-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left;
    white-space: normal;
    min-width: 220px;
    max-width: 260px;
    word-break: break-word;
}
.fps-sticky-th {
    background: #0d0d0d;
    z-index: 3;
}
.fps-sticky-td {
    background: #050505;
    box-shadow: 6px 0 12px -8px rgba(0,0,0,0.9);
}
.fps-table tbody tr:hover .fps-sticky-td { background: #0c0c0c; }

.fps-firm-line { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.fps-firm-logo { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; }
.fps-firm-name { font-size: 12px; color: #b3b3b3; font-weight: 600; }
.fps-rating { font-size: 11px; color: #fb923c; margin-left: auto; font-weight: 700; }

.fps-plan-name { font-size: 14px; font-weight: 700; color: #fff; }
.fps-plan-sub { font-size: 11px; color: #8a8a8a; margin-top: 2px; }

.fps-num { font-variant-numeric: tabular-nums; }
.fps-risk { color: #f87171; font-weight: 600; }
.fps-target { color: #4ade80; font-weight: 600; }
.fps-subtext { font-size: 10px; color: #7a7a7a; margin-top: 2px; font-weight: 400; }

.fps-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #2a2a2a;
    white-space: nowrap;
}
.fps-badge-instant { color: #fbbf24; border-color: #4a3a12; background: rgba(251,191,36,0.08); }
.fps-badge-eval { color: #93c5fd; border-color: #1c3350; background: rgba(147,197,253,0.08); }
.fps-badge-buffer { color: #86efac; border-color: #14532d; background: rgba(134,239,172,0.08); }

.fps-cta {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    margin: 2px;
    white-space: nowrap;
}
.fps-cta-ghost {
    color: #d4d4d4;
    border: 1px solid #333;
    background: transparent;
}
.fps-cta-ghost:hover { border-color: #666; color: #fff; }
.fps-cta-buy {
    color: #fff;
    background: linear-gradient(90deg, #fb923c 0%, #ec4899 60%, #a855f7 100%);
}
.fps-cta-buy:hover { opacity: 0.9; color: #fff; }

@media (max-width: 640px) {
    .fps-wrapper { padding: 14px; border-radius: 10px; }
    .fps-table th, .fps-table td { padding: 10px 12px; font-size: 12px; }
    .fps-sticky { min-width: 170px; max-width: 190px; }
}
