/* =============================================================================
   TRM Affiliate Operator Components — Tables
   -----------------------------------------------------------------------------
   ONE markup, many templates. The base class `.operator-tables` IS the default
   template and holds all the shared structure + styling. A named template adds a
   second class that only overrides what differs, e.g.:

       <div class="operator-tables">                  → default template
       <div class="operator-tables template-compact">  → default + compact tweaks

   So shared CSS lives once on `.operator-tables` / `.ot-*`, and each template is
   a small override block scoped to `.operator-tables.template-<name>`.

   Mobile-first: each row is a flex container (NOT a <table>) — a stacked card on
   phones, a horizontal row at ≥768px. Columns are flex cells, so adding/removing
   one just reflows. Theme colors are CSS variables — override on a theme class.
   ========================================================================== */

/* ── Base / default template ──────────────────────────────────────────────── */
.operator-tables {
    /* ── Component brand palette ──────────────────────────────────────────────
       The 5 canonical colors EVERY component inherits. The three brand colors
       source from the theme's --brand-* vars (hex fallback so they resolve
       standalone); the two text colors are fixed. Override these on an
       .accent-<scheme> class to reskin the whole system at once. When authoring
       a scheme, explicitly point --ot-cta-fg / --ot-rank-fg at text-light or
       text-dark depending on how the fills read. */
    --trm-component-primary:        var(--brand-primary,        #1c4587); /* brand blue — #1 rank */
    --trm-component-primary-dark:   var(--brand-primary-dk,     #163669); /* darker blue — ranks 2+ */
    --trm-component-primary-accent: var(--brand-accent,         #c9a13a); /* gold — highlight rail / accent */
    --trm-component-cta:            var(--brand-cta_primary,    #e92020); /* red — CTA button fill */
    --trm-component-cta-dark:       var(--brand-cta_primary-dk, #c31313); /* dark red — CTA hover / border */
    --trm-component-text-light:     #ffffff;
    --trm-component-text-dark:      #000000;
    --trm-component-ribbon-top:     #FFE24D; /* Editor's Pick ribbon — top color */
    --trm-component-ribbon-bottom:  #FF8A00; /* Editor's Pick ribbon — bottom color */
    --trm-component-ribbon:         linear-gradient(180deg, var(--trm-component-ribbon-top), var(--trm-component-ribbon-bottom));
    --trm-component-button-accent:  var(--trm-component-cta-dark); /* two-tone button shapes: arrow/pill/capsule/divider/diagonal zones + default left border */

    /* ── Table role tokens — mapped FROM the palette above ─────────────────────
       Schemes may override these directly for finer control, but the default
       wiring is: primary → fills, primary-dark → borders + secondary ranks,
       primary-accent → highlight, text-light → text on fills. */
    --ot-primary:      var(--trm-component-primary);       /* legacy alias (brand blue) */
    --ot-primary-dk:   var(--trm-component-primary-dark);  /* legacy alias */
    --ot-accent:       var(--trm-component-primary-accent);          /* gold — highlight rail / top-row accent */
    --ot-cta:          var(--trm-component-cta);                     /* red — legacy alias */
    --ot-cta-2:        var(--brand-cta_secondary_bg, var(--color-cta-secondary-bg, #3a5067));

    --ot-rank-bg:      var(--trm-component-primary-dark);            /* rank stripe (ranks 2+) — darker blue */
    --ot-rank-bg-top:  var(--trm-component-primary);                /* #1 rank stripe — blue */
    --ot-rank-fg:      var(--trm-component-text-light);             /* rank text — light/dark per scheme */
    --ot-cta-bg:       var(--trm-component-cta);                    /* CTA button fill — red */
    --ot-cta-dk:       var(--trm-component-cta-dark);               /* darker red — borders / hover */
    --ot-cta-bg-hover: var(--ot-cta-dk);
    --ot-cta-accent:   var(--trm-component-button-accent);          /* two-tone button shape color */
    --ot-cta-fg:       var(--trm-component-text-light);            /* button text — light/dark per scheme */
    --ot-border:       var(--color-border-soft, var(--contrast-3, #e5e7eb));
    --ot-row-bg:       var(--base-3, #ffffff);
    --ot-row-bg-top:   var(--base-2, #f8fafc);
    --ot-text:         var(--contrast, #111827);
    --ot-muted:        var(--contrast-2, #6b7280);
    --ot-radius:       4px;

    box-sizing: border-box;
    color: var(--ot-text);
    font-family: "Archivo", "Helvetica Neue", sans-serif;
    font-size: 0.9rem;
    line-height: 1;
    /* Aligned, even-width digits so ratings / $ amounts / ranks line up. */
    font-variant-numeric: tabular-nums;

    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
.operator-tables *,
.operator-tables *::before,
.operator-tables *::after { box-sizing: border-box; }

/* ── Accent (highlight) ──────────────────────────────────────────────────────
   Accent is the single color axis: an .accent-<slug> class overrides the
   component palette (--trm-component-*) and/or the --ot-* role tokens. "brand"
   is the base (no block). Register slugs in accent_colors(). */

/* Accent: Primary — the house brand scheme. Overrides only the component palette;
   every role token inherits automatically. Text stays light on the red/navy fills. */
.operator-tables.accent-primary {
    --trm-component-primary:        #FF0000;
    --trm-component-primary-dark:   #213f5b;
    --trm-component-primary-accent: #cedbe7;
    --trm-component-cta:            #FF0000; /* keep Primary's red CTA fill */
    --trm-component-cta-dark:       #213f5b; /* keep Primary's navy CTA border/hover */
    --trm-component-button-accent: #DB0202;
    /* explicit text choice for this scheme */
    --ot-cta-fg:  var(--trm-component-text-light);
    --ot-rank-fg: var(--trm-component-text-light);
}

/* Accent: Green — "bet now / money" emerald for gambling tables. Green drives
   both the ranks (primary) and the CTA (cta); gold accent + the default
   yellow-orange ribbon. Button shapes inherit the deep-green cta-dark. */
.operator-tables.accent-green {
    --trm-component-primary:        #157347; /* emerald — #1 rank */
    --trm-component-primary-dark:   #0B4F31; /* deep green — ranks 2+ */
    --trm-component-primary-accent: #C9A13A; /* gold — highlight rail */
    --trm-component-cta:            #157347; /* emerald — CTA fill */
    --trm-component-cta-dark:       #0B4F31; /* deep green — CTA border/hover + button shapes */
    /* text light on the green fills */
    --ot-cta-fg:  var(--trm-component-text-light);
    --ot-rank-fg: var(--trm-component-text-light);
}

.operator-tables .ot-heading {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
}

/* Rows + cells -------------------------------------------------------------- */
.operator-tables .ot-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 10px 16px;
    background: var(--ot-row-bg);
    border-radius: var(--ot-radius);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);
    overflow: hidden; /* clip the rank stripe to the rounded corners */
}
.operator-tables .ot-row--top {
    background: var(--ot-row-bg-top);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
    /* Allow the "Editor's Pick" ribbon to straddle (split) the top border.
       overflow:hidden is dropped here, so round the rank stripe's own left
       corners to keep it clipped to the card's rounded corners. */
    position: relative;
    overflow: visible;
    margin-top: 11px;
}
.operator-tables .ot-row--top .ot-cell--rank { border-radius: var(--ot-radius) 0 0 var(--ot-radius); }

/* Featured "Editor's Pick" ribbon — starts where the Name column ends and
   straddles (splits) the card's top border. Anchored to the name cell so it
   follows that column's real width. */
.operator-tables .ot-row--top .ot-cell--name { position: relative; }
.operator-tables .ot-editors-pick {
    position: absolute;
    top: -12px;            /* up to the row's top border (row padding-top), nudged 1px */
    right: 0;              /* attach to the right side of the Name column (sits inside it) */
    left: auto;
    transform: translateY(-50%);
    z-index: 2;
    --r: 1.1em;                                    /* ribbon notch depth — tweak */
    background: var(--trm-component-ribbon);
    color: var(--trm-component-text-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    padding: 7.25px calc(var(--r) + 0.6em) 5.75px; /* +2px taller; top>bottom keeps optical center for caps */
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--r)) 50%, 100% 100%, 0 100%, var(--r) 50%);
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
    pointer-events: none;
}
/* Star flourish + stitched inner line (default badge only — editorial clears them).
   The badge's clip-path also clips ::after, so the stitch is cut at the notches. */
.operator-tables .ot-editors-pick::before { content: "\2605"; margin-right: 5px; font-size: 0.95em; }
.operator-tables .ot-editors-pick::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px dashed color-mix(in srgb, var(--trm-component-text-dark) 42%, transparent);
    pointer-events: none;
}
.operator-tables.template-editorial-top-pick .ot-editors-pick::before,
.operator-tables.template-editorial-top-pick .ot-editors-pick::after { content: none; }
/* Classic Table "top pick": no badge — an accent left rail, with a vertical
   stack of 3 stars in the #1 rank spot (the 3-star markup is in responsive_css). */
.operator-tables.template-classic-table .ot-editors-pick { display: none; }
.operator-tables.template-classic-table .ot-row--top { border-left: 5px solid var(--ot-accent); }

/* ── Dark Leaderboard template ───────────────────────────────────────────────
   Shared cell markup (columns stay add/removable) restyled as dark cards.
   COLOR MODEL: the template class below carries its dark card colors directly
   (not driven by --ot-* tokens); the highlight (#1 border, rank, CTA) follows
   --ot-cta-bg / --ot-cta-dk, so it recolors with whatever accent scheme is active.
   Mobile-first: cards stack; desktop row + column proportions in responsive_css(). */
.operator-tables.template-dark-leaderboard { display: block; background: #10151e; border-radius: 14px; padding: 14px; color: #e7edf5; }
.operator-tables.template-dark-leaderboard .ot-row { background: #172131; border: 1px solid #27344a; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: none; color: #e7edf5; }
.operator-tables.template-dark-leaderboard .ot-row:last-child { margin-bottom: 0; }
.operator-tables.template-dark-leaderboard .ot-row--top { border-color: var(--ot-cta-bg); background: #1b2738; }
.operator-tables.template-dark-leaderboard .ot-cell--rank { background: transparent; margin: 0; padding: 0; align-self: center; min-width: 0; }
.operator-tables.template-dark-leaderboard .ot-row--top .ot-cell--rank { background: transparent; }
.operator-tables.template-dark-leaderboard .ot-row--top .ot-rank::before { display: none; }
.operator-tables.template-dark-leaderboard .ot-rank { font-size: 24px; font-weight: 800; color: #5b6b85; }
.operator-tables.template-dark-leaderboard .ot-row--top .ot-rank { color: var(--ot-cta-bg); }
/* Dark Leaderboard × Default (brand) accent only: white #1 rank number. */
.operator-tables.template-dark-leaderboard.accent-brand .ot-row--top .ot-rank { color: var(--trm-component-text-light); }
.operator-tables.template-dark-leaderboard .ot-logo { width: 44px; height: 44px; object-fit: cover; background: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.operator-tables.template-dark-leaderboard .ot-name { font-size: 15px; font-weight: 700; color: #e7edf5; }
.operator-tables.template-dark-leaderboard .ot-stars { color: #33415a; }
.operator-tables.template-dark-leaderboard .ot-rating-val { display: none; }
.operator-tables.template-dark-leaderboard .ot-bonus { font-size: 14.5px; font-weight: 700; color: #fff; }
.operator-tables.template-dark-leaderboard .ot-label { display: block; color: #8a99b3; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 2px; }
.operator-tables.template-dark-leaderboard .ot-rollover,
.operator-tables.template-dark-leaderboard .ot-min { font-size: 14px; color: #cdd6e4; }
.operator-tables.template-dark-leaderboard .ot-empty { color: #8a99b3; }
.operator-tables.template-dark-leaderboard .ot-help { background: #8a99b3; border-color: #3a4a66; color: #cdd6e4; }
.operator-tables.template-dark-leaderboard .ot-cta { display: inline-block; width: auto; background: var(--ot-cta-bg); color: var(--ot-cta-fg); font-weight: 800; font-size: 13.5px; text-decoration: none; padding: 12px 22px; border-radius: 10px; white-space: nowrap; border: 0; }
.operator-tables.template-dark-leaderboard .ot-cta:hover { background: var(--ot-cta-dk); }

/* ── Score Dial Board template ───────────────────────────────────────────────
   Light cards with a circular score gauge for the rating (placed after the
   name). ONE accent drives BOTH the gauge ring and the CTA — they always match;
   no per-row colors. The ring is a conic-gradient masked into a donut, filled to
   the inline --rpct (0–100) the rating renderer emits. Neutral (light) look is
   fixed here; the accent axis recolors the highlight via var(--ot-accent).
   Mobile-first: cards stack; desktop row proportions in responsive_css(). */
.operator-tables.template-score-dial-board { display: block; background: transparent; }
.operator-tables.template-score-dial-board .ot-row { background: var(--ot-row-bg); border: 1px solid var(--ot-border); border-left: 3px solid var(--ot-primary); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; box-shadow: none; color: var(--ot-text); }
.operator-tables.template-score-dial-board .ot-row:last-child { margin-bottom: 0; }
.operator-tables.template-score-dial-board .ot-row--top { border-color: var(--ot-border); border-left-color: var(--ot-primary); border-left-width: 6px; background: var(--ot-row-bg-top); box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12); }
/* Rank: small muted number, no stripe / star / flag. */
.operator-tables.template-score-dial-board .ot-cell--rank { background: transparent; margin: 0; padding: 0; min-width: 0; align-self: center; }
.operator-tables.template-score-dial-board .ot-row--top .ot-cell--rank { background: transparent; }
.operator-tables.template-score-dial-board .ot-rank { flex-direction: row; font-size: 13px; font-weight: 800; color: var(--ot-muted); font-variant-numeric: tabular-nums; }
.operator-tables.template-score-dial-board .ot-row--top .ot-rank { color: var(--ot-muted); }
.operator-tables.template-score-dial-board .ot-row--top .ot-rank::before { display: none; }
.operator-tables.template-score-dial-board .ot-editors-pick,
.operator-tables.template-score-dial-board .ot-rank-flag { display: none; }
/* Score gauge — donut ring filled to --rpct. Green two-tier: a vivid green for
   the #1 row, a lighter green for all the others. On load the ring sweeps from
   0 up to each gauge's own --rpct (registered below so the conic-gradient can
   animate); browsers without @property just show it filled. */
@property --rpct { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes ot-gauge-fill { from { --rpct: 0; } }
.operator-tables.template-score-dial-board .ot-gauge { position: relative; width: 42px; height: 42px; flex: none; display: inline-block; }
.operator-tables.template-score-dial-board .ot-gauge-ring { position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(#5fc084 calc(var(--rpct, 0) * 1%), #edeff3 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 4px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 4px));
    animation: ot-gauge-fill 1.5s cubic-bezier(.22,.61,.36,1) both; }
.operator-tables.template-score-dial-board .ot-row--top .ot-gauge-ring {
    background: conic-gradient(#1faa4e calc(var(--rpct, 0) * 1%), #edeff3 0); }
@media (prefers-reduced-motion: reduce) {
    .operator-tables.template-score-dial-board .ot-gauge-ring { animation: none; }
}
.operator-tables.template-score-dial-board .ot-gauge-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 13px; color: var(--ot-text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
/* Logo, name, bonus. */
.operator-tables.template-score-dial-board .ot-logo { width: 42px; height: 42px; box-shadow: 0 0 0 1px rgba(0,0,0,.06); }
.operator-tables.template-score-dial-board .ot-name { font-size: 15px; font-weight: 700; color: var(--ot-text); letter-spacing: -.01em; }
.operator-tables.template-score-dial-board .ot-bonus { font-size: 14.5px; font-weight: 700; color: var(--ot-text); letter-spacing: -.01em; }
.operator-tables.template-score-dial-board .ot-rollover,
.operator-tables.template-score-dial-board .ot-min { font-size: 11.5px; color: var(--ot-muted); }
.operator-tables.template-score-dial-board .ot-label { display: block; color: var(--ot-muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; margin-bottom: 2px; }
/* Only the Bonus Offer + Min Deposit cells carry captions; hide the rest. */
.operator-tables.template-score-dial-board .ot-cell--rank .ot-label,
.operator-tables.template-score-dial-board .ot-cell--logo .ot-label,
.operator-tables.template-score-dial-board .ot-cell--name .ot-label,
.operator-tables.template-score-dial-board .ot-cell--rating .ot-label,
.operator-tables.template-score-dial-board .ot-cell--cta .ot-label { display: none; }
.operator-tables.template-score-dial-board .ot-empty { color: var(--ot-muted); }
.operator-tables.template-score-dial-board .ot-help { background: #eef0f3; border-color: #d3d8e0; color: #46505f; }
/* CTA — same accent color as the gauge ring. */
.operator-tables.template-score-dial-board .ot-cta { display: inline-block; width: auto; background: var(--ot-cta-bg); color: var(--ot-cta-fg); font-weight: 800; font-size: 13.5px; text-decoration: none; padding: 11px 22px; border-radius: 10px; white-space: nowrap; border: 0; }
.operator-tables.template-score-dial-board .ot-cta:hover { background: var(--ot-cta-dk); }

/* ── CTA button styles ───────────────────────────────────────────────────────
   A `cta-<style>` class on the container layers an icon/shape flourish onto the
   CTA. Color-agnostic (Unicode arrows + translucent white shapes), so the button
   keeps whatever color the template + accent give it. !important so the chosen
   style beats each template's own .ot-cta rules (an explicit pick).
   `cta-default` = the template's own button, untouched — no rules needed. */

/* All CTA buttons fill their cell → uniform width within a table; text left-aligned.
   A fixed height gives every button the SAME height across styles + templates,
   including the icon capsule (whose circle would otherwise inflate it). Content
   is vertically centred. Bump the 40px to size every button's height. */
.operator-tables .ot-cell--cta .ot-cta { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start; text-align: left; height: 36px; padding-top: 0; padding-bottom: 0; box-shadow: rgba(14, 30, 37, 0.12) 0px 2px 4px 0px, rgba(14, 30, 37, 0.32) 0px 2px 16px 0px; }

/* Default button (no icon) — centered text, 8px left rail. The rail is a DARKER
   shade of the accent so it's visible against the same-colored button fill;
   black on the default (brand) scheme. */
.operator-tables.cta-default .ot-cta { justify-content: center; text-align: center; border-left: 8px solid var(--ot-cta-accent); }

/* Heavier arrow glyphs (\279C ➜, \279A ➚) with \FE0E to force text — not emoji —
   rendering, so the arrows read solid rather than skinny. */

/* Sliding arrow — trailing arrow that nudges right on hover. */
.operator-tables.cta-arrow .ot-cta { display: inline-flex !important; align-items: center; gap: 7px; }
.operator-tables.cta-arrow .ot-cta::after { content: "\279C\FE0E"; margin-left: auto; margin-right: -5px; align-self: stretch; display: flex; align-items: center; padding-left: 8px; padding-top: 2px; border-left: 2px solid var(--ot-cta-accent); font-size: 15px; line-height: 1; transition: transform .18s ease; }
.operator-tables.cta-arrow .ot-cta:hover::after { transform: translateX(3px); }

/* Pill + arrow — fully rounded; arrow on the right in a full-height dark zone
   (same shade as the capsule) that fills to the pill's rounded right edge. */
.operator-tables.cta-pill .ot-cta { display: inline-flex !important; align-items: center; border-radius: 999px !important; padding-right: 0 !important; overflow: hidden; }
.operator-tables.cta-pill .ot-cta::after { content: "\279C\FE0E"; margin-left: auto; align-self: stretch; display: flex; align-items: center; padding: 2px 9px 0; background: var(--ot-cta-accent); font-size: 15px; line-height: 1; transition: transform .18s ease, background .18s ease; }
.operator-tables.cta-pill .ot-cta:hover::after { transform: translateX(3px); background: color-mix(in srgb, var(--ot-cta-accent) 82%, #000); }

/* Icon capsule — pill with the arrow in a darker circle. */
.operator-tables.cta-capsule .ot-cta { display: inline-flex !important; align-items: center; gap: 10px; border-radius: 999px !important; padding-left: 3px !important; }
.operator-tables.cta-capsule .ot-cta::before { content: "\279C\FE0E"; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding-top: 2px; border-radius: 50%; background: var(--ot-cta-accent); font-size: 15px; line-height: 1; flex: none; }
.operator-tables.cta-capsule .ot-cta:hover::before { background: color-mix(in srgb, var(--ot-cta-accent) 82%, #000); }

/* Icon + divider — right arrow in a full-height darker zone at the left edge. */
.operator-tables.cta-divider .ot-cta { position: relative; display: inline-flex !important; align-items: center; justify-content: flex-start !important; padding-left: 52px !important; overflow: hidden; }
.operator-tables.cta-divider .ot-cta::before { content: "\279C\FE0E"; position: absolute; left: 0; top: 0; bottom: 0; width: 40px; display: flex; align-items: center; justify-content: center; padding-top: 2px; background: var(--ot-cta-accent); font-size: 15px; line-height: 1; }

/* Diagonal with icon — dark button body, an accent-colored diagonal wedge on the
   left holding the poker-chip icon; text sits on the dark body. The wedge color is
   the accent (var --ot-accent), so it's red on a red-brand site, green/blue on
   those schemes. Image path is relative to this stylesheet (assets/css → images). */
.operator-tables.cta-diagonal .ot-cta { position: relative; overflow: hidden; justify-content: flex-start; text-align: left; padding-left: 48px !important; }
/* Wedge = a full-height rectangle skewed into a diagonal (transform edges anti-
   alias, so no jaggies; full height means no bottom gap). Soft shadow along the
   slant for depth. */
.operator-tables.cta-diagonal .ot-cta::before { content: ""; position: absolute; top: 0; bottom: 0; left: -14px; width: 51px; background: var(--ot-cta-accent); transform: skewX(-12deg); box-shadow: 2px 0 5px rgba(0,0,0,.3); }
/* Chip icon, sitting upright on the wedge. */
.operator-tables.cta-diagonal .ot-cta::after { content: ""; position: absolute; left: 7px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; background: var(--diag-icon, url(../images/poker-chip.png)) center / 22px 22px no-repeat; z-index: 1; }
/* Which wedge icon — set by the diag-icon-<slug> class on the container. */
.operator-tables.diag-icon-poker-chip    { --diag-icon: url(../images/poker-chip.png); }
.operator-tables.diag-icon-gambling-dice { --diag-icon: url(../images/gambling-dice.png?v=2); }
.operator-tables.diag-icon-blackjack-21  { --diag-icon: url(../images/blackjack-21.png); }
.operator-tables.diag-icon-shield-check  { --diag-icon: url(../images/shield-check.svg); }
.operator-tables.diag-icon-star          { --diag-icon: url(../images/star.svg); }

/* ── Editorial Top Pick template ─────────────────────────────────────────────
   Design 03 — the #1 pick is a big editorial "hero" card; ranks 2+ are a compact
   ranked list beneath it. BOTH use the shared .ot-row/.ot-cell markup (columns
   stay add/removable) — the hero look is pure CSS on .ot-row--top. Colors come
   from the shared --ot-* brand variables (like every other table): --ot-row-bg
   surfaces, --ot-border lines, --ot-accent the left rail + eyebrow, --ot-cta-*
   the buttons. Placed AFTER the CTA button rules so its CTA overrides them.
   Mobile-first; desktop grid in responsive_css(). */
.operator-tables.template-editorial-top-pick { display: block; background: transparent; color: var(--ot-text); }
.operator-tables.template-editorial-top-pick .ot-editors-pick,
.operator-tables.template-editorial-top-pick .ot-rank-flag { all: unset; }
.operator-tables.template-editorial-top-pick .ot-rating-val { display: none; }

/* ---- Hero (#1) — editorial card ---- */
.operator-tables.template-editorial-top-pick .ot-row--top { background: var(--ot-row-bg); border: 1px solid var(--ot-border); border-left: 5px solid var(--ot-accent); border-radius: 14px; box-shadow: none; margin: 0 0 18px; padding: 22px; align-items: center; gap: 20px; }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-cell--rank { display: none; }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 1px rgba(0,0,0,.07); }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-cell--name { flex-direction: column; align-items: flex-start; gap: 5px; }
/* Turn the "Editor's Pick" badge into the eyebrow above the name. */
.operator-tables.template-editorial-top-pick .ot-row--top .ot-editors-pick { display: block; order: -1; color: var(--ot-accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
/* Editorial Top Pick × Primary accent only: eyebrow matches the button red. */
.operator-tables.template-editorial-top-pick.accent-primary .ot-row--top .ot-editors-pick { color: var(--ot-cta-bg); }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--ot-text); }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-bonus { font-size: 20px; font-weight: 800; color: var(--ot-text); }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-cta { background: var(--ot-cta-bg); color: var(--ot-cta-fg); border: 0; font-weight: 800; white-space: nowrap; }
.operator-tables.template-editorial-top-pick .ot-row--top .ot-cta:hover { background: var(--ot-cta-dk); }

/* ---- List (ranks 2+) — compact rows in a shared card ---- */
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) { background: var(--ot-row-bg); border-left: 1px solid var(--ot-border); border-right: 1px solid var(--ot-border); box-shadow: none; border-radius: 0; margin: 0; padding: 14px 18px; }
.operator-tables.template-editorial-top-pick .ot-row--top + .ot-row { border-top: 1px solid var(--ot-border); border-radius: 12px 12px 0 0; }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) + .ot-row:not(.ot-row--top) { border-top: 1px solid var(--ot-border); }
.operator-tables.template-editorial-top-pick .ot-row:last-child:not(.ot-row--top) { border-bottom: 1px solid var(--ot-border); border-radius: 0 0 12px 12px; }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-cell--rank { background: transparent; margin: 0; padding: 0; min-width: 0; align-self: center; }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-rank { flex-direction: row; font-size: 15px; font-weight: 800; color: var(--ot-muted); }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-rank::before { display: none; }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(0,0,0,.07); }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-name { font-size: 14.5px; font-weight: 700; color: var(--ot-text); }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-bonus { font-size: 13px; font-weight: 600; color: var(--ot-text); }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-cta { background: var(--ot-cta-bg); color: var(--ot-cta-fg); border: 0; font-weight: 800; text-decoration: none; white-space: nowrap; }
.operator-tables.template-editorial-top-pick .ot-row:not(.ot-row--top) .ot-cta:hover { background: var(--ot-cta-dk); color: var(--ot-cta-fg); }
/* Column labels above the value (Bonus / Rollover); hidden on rank/logo/name/cta. */
.operator-tables.template-editorial-top-pick .ot-label { display: block; color: var(--ot-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.operator-tables.template-editorial-top-pick .ot-cell--rank .ot-label,
.operator-tables.template-editorial-top-pick .ot-cell--logo .ot-label,
.operator-tables.template-editorial-top-pick .ot-cell--name .ot-label,
.operator-tables.template-editorial-top-pick .ot-cell--cta .ot-label { display: none; }
.operator-tables.template-editorial-top-pick .ot-empty { color: #9aa4ad; }


/* NOTE: the responsive switch (mobile ⇄ desktop) is injected as inline CSS by
   TRM_AOC_Tables::responsive_css() so the breakpoint tracks GeneratePress's
   "mobile_menu_breakpoint" setting. The mobile-only ot-editors-pick override and
   the desktop horizontal-row layout live there, not here. */

/* Mobile default: every cell is its own full-width line with an inline label. */
.operator-tables .ot-cell {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.operator-tables .ot-label {
    flex: 0 0 88px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ot-muted);
}
.operator-tables .ot-value { flex: 1 1 auto; min-width: 0; }

/* Alignment reset ──────────────────────────────────────────────────────────
   Strip stray line-height / margin / padding from cell content so every
   column's data sits on the same vertical centre line. Per-template nudges
   (e.g. default-branding's negative margins) still override this — we tweak
   those next. Start clean here. */
.operator-tables .ot-value,
.operator-tables .ot-label,
.operator-tables .ot-name,
.operator-tables .ot-bonus,
.operator-tables .ot-rating,
.operator-tables .ot-rating-val,
.operator-tables .ot-min,
.operator-tables .ot-rollover,
.operator-tables .ot-promo,
.operator-tables .ot-editorial { margin: 0; padding: 0; line-height: 1; }

/* Rank + logo share the first line on mobile. */
.operator-tables .ot-cell--rank { flex: 0 0 auto; }
.operator-tables .ot-cell--logo { flex: 1 1 auto; }
.operator-tables .ot-cell--rank .ot-label,
.operator-tables .ot-cell--logo .ot-label { display: none; }

/* Cell visuals -------------------------------------------------------------- */
/* Rank: full-height colored stripe down the left of the row (default template).
   Negative margins bleed the cell into the row's 11px/16px padding so the band
   is flush to the top, bottom, and left edges; overflow:hidden on the row clips
   it to the rounded corners. */
.operator-tables .ot-cell--rank {
    align-self: stretch;
    margin: -10px 0 -7px -16px;
    min-width: 52px;
    padding: 0 10px;
    background: var(--ot-rank-bg);
    color: var(--ot-rank-fg);
    justify-content: center;
    align-items: center;
    text-align: center;
}
.operator-tables .ot-rank {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: var(--ot-rank-fg);
}
/* #1 gets a distinct accent band + a star above the number. Dark brand text
   reads cleanly on the gold accent (white would be too low-contrast). */
.operator-tables .ot-row--top .ot-cell--rank { background: var(--ot-rank-bg-top); }
.operator-tables .ot-row--top .ot-rank { color: var(--ot-rank-fg); }
.operator-tables .ot-row--top .ot-rank::before {
    content: "\2605";
    font-size: 16px;
    line-height: 1;
}

.operator-tables .ot-logo-link { display: inline-flex; align-items: center; }
/* Default logo avatar: round. Square source images (the `small` set) crop
   cleanly into the circle. The per-table logo variant (logos-* on the
   container) restyles this; a template using wide logos can also override
   `.operator-tables.template-<name> .ot-logo { border-radius: 0; … }`. */
.operator-tables .ot-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
/* Logo variants — AUTHORITATIVE. The logos-* class on the container dictates the
   logo SHAPE for every template (templates must not fight it), hence !important. */
.operator-tables.logos-small-rounded .ot-logo { border-radius: 50% !important; }
.operator-tables.logos-small-square .ot-logo { border-radius: 3px !important; }
/* Standard = wide landscape logos (e.g. 132x45): show at natural size, capped
   by height so rows stay even; no square crop, no avatar chrome. */
.operator-tables.logos-standard .ot-logo { width: auto !important; height: auto !important; max-width: 100%; max-height: 35px; border-radius: 0 !important; object-fit: contain !important; background: transparent !important; box-shadow: none !important; }
/* Dark Leaderboard + Standard logos: transparent/dark logos vanish on the dark
   card, so seat them on a white rounded plate so their colors read. */
.operator-tables.template-dark-leaderboard.logos-standard .ot-logo { background: #ffffff !important; border-radius: 8px !important; padding: 5px 9px; box-sizing: border-box; max-height: 42px; }
.operator-tables .ot-name { font-weight: 700; }
.operator-tables .ot-rank-flag { display: none; }
.operator-tables .ot-namecell { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.operator-tables .ot-namecell .ot-rating { margin-top: -3px; }
/* "Name + bonus" mode — small muted subline under the operator name. */
.operator-tables .ot-name-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--ot-muted); line-height: 1.25; }

.operator-tables .ot-bonus { font-weight: 600; }
.operator-tables.template-default-branding .ot-bonus { font-weight: 400; }
.operator-tables.template-default-branding .ot-name { font-size: 0.95rem; }
.operator-tables .ot-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-left: 7px;
    border-radius: 50%;
    background: #f1f1f1;
    border: 1px solid #d9dce1;
    color: #1d2a4a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;
    vertical-align: middle;
}

/* Tooltip lives on <body> (appended by tooltip.js) so it isn't scoped under
   .operator-tables and isn't clipped by the row's overflow:hidden. */
.ot-tooltip {
    position: fixed;
    z-index: 99999;
    max-width: 220px;
    background: #f1f1f1;
    color: #000;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    display: none;
}
/* Triangle pointer at the bottom center, aimed at the trigger below. A real
   triangle (not a rotated square) so there's no top corner peeking above the
   box; drop-shadow follows the triangle's shape so the shadow matches the box. */
.ot-tooltip::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #f1f1f1;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.18));
}
/* When the tooltip flips below the trigger, point the triangle up instead. */
.ot-tooltip.ot-tooltip--below::after {
    bottom: auto;
    top: -6px;
    border-top: 0;
    border-bottom: 6px solid #f1f1f1;
    filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.12));
}
.operator-tables .ot-rollover { font-size: 0.95em; }

/* ── Inline Edit Table affordances (admin editor only; .ot-editing) ────────── */
.operator-tables.ot-editing .ot-name,
.operator-tables.ot-editing .ot-bonus,
.operator-tables.ot-editing .ot-min,
.operator-tables.ot-editing .ot-rollover,
.operator-tables.ot-editing .ot-promo,
.operator-tables.ot-editing .ot-cta {
    outline: 1px dashed #c9ccd1;
    outline-offset: 2px;
    cursor: text;
    min-width: 14px;
}
.operator-tables.ot-editing [contenteditable="true"]:hover { outline-color: #c0532e; }
.operator-tables.ot-editing [contenteditable="true"]:focus { outline: 2px solid #2271b1; background: #fff8e5; }
.operator-tables.ot-editing .ot-help { cursor: pointer; }
.operator-tables.ot-editing .ot-help--empty { opacity: 0.5; }
.ot-ovr-revert { border: 0; background: none; cursor: pointer; color: #b32d2e; font-size: 13px; line-height: 1; margin-left: 4px; padding: 0; }
.operator-tables.ot-editing .ot-tip-edit-lbl { font-size: 11px; color: #777; }
.ot-tip-input { width: 200px; max-width: 100%; font-size: 12px; }
.ot-cell-val { font-size: 12px; width: 100%; max-width: 220px; }
/* Click-to-edit: a cell's controls stay hidden until you click the cell. */
.operator-tables.ot-editing .ot-cell-edit,
.operator-tables.ot-editing .ot-tip-edit { display: none; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.operator-tables.ot-editing .ot-cell-editable { cursor: pointer; }
.operator-tables.ot-editing .ot-cell-editable:hover { outline: 1px dashed var(--ot-border); outline-offset: 2px; }
.operator-tables.ot-editing .ot-cell.is-editing { outline: 1px solid var(--ot-accent); outline-offset: 2px; cursor: auto; }
.operator-tables.ot-editing .ot-cell.is-editing .ot-cell-edit { display: flex; }
.operator-tables.ot-editing .ot-cell.is-editing .ot-tip-edit { display: block; }

/* Rating — CSS star bar on a 5-scale (half-star precision via fill width %). */
.operator-tables .ot-rating { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; line-height: 1; }
.operator-tables .ot-stars { position: relative; display: inline-block; font-size: 19px; line-height: 1; color: #d1d5db; }
.operator-tables .ot-stars::before { content: "\2605\2605\2605\2605\2605"; }
.operator-tables .ot-stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: #f59e0b; }
.operator-tables .ot-stars-fill::before { content: "\2605\2605\2605\2605\2605"; }
.operator-tables .ot-rating-val { font-size: 0.8em; color: var(--ot-muted); font-weight: 600; line-height: 1; }
.operator-tables.template-default-branding .ot-rating-val { position: relative; top: 2px; }
.operator-tables.template-classic-table .ot-rating-val { position: relative; top: 2px; }
.operator-tables.template-default-branding .ot-namecell .ot-rating { margin-top: -6px; }
.operator-tables .ot-promo {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}
.operator-tables .ot-empty { color: var(--ot-muted); }

.operator-tables .ot-type {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
}
.operator-tables .ot-type--offshore { background: #fef3c7; color: #92400e; }
.operator-tables .ot-type--regulated { background: #dcfce7; color: #166534; }

.operator-tables .ot-editorial {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
}

.operator-tables .ot-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px 18px;
    background: var(--ot-cta-bg);
    color: var(--ot-cta-fg);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.15s ease;
}
.operator-tables .ot-cta:hover,
.operator-tables .ot-cta:focus { background: var(--ot-cta-bg-hover); color: var(--ot-cta-fg); }

/* Default (brand) accent: button hover uses the muted rollover-title color (#8a99b3),
   matching the dark-leaderboard "?" background. Covers every template's hover. */
.operator-tables.accent-brand .ot-cta:hover,
.operator-tables.accent-brand .ot-cta:focus,
.operator-tables.accent-brand .ot-row--top .ot-cta:hover,
.operator-tables.accent-brand .ot-row:not(.ot-row--top) .ot-cta:hover { background: #8a99b3; color: var(--ot-cta-fg); }

/* Desktop horizontal-row layout is injected dynamically — see
   TRM_AOC_Tables::responsive_css() (breakpoint = GeneratePress mobile setting). */

/* =============================================================================
   TEMPLATE OVERRIDES
   Add new templates below. Only style what differs from the base — everything
   else cascades. Pattern:

       .operator-tables.template-<name> .ot-row { ... }

   Example (uncomment / adapt to ship a "compact" template — variant="compact"):

   .operator-tables.template-compact { gap: 6px; }
   .operator-tables.template-compact .ot-row { padding: 8px 12px; }
   .operator-tables.template-compact .ot-logo { max-height: 32px; }
   .operator-tables.template-compact .ot-cta { padding: 9px 14px; }
   ========================================================================== */
