/* ================================================================
   500 — the few components Whist has no equivalent for.
   Everything else comes from ../whist/whist.css and lib/theme.css.
   ================================================================ */

/* 2–6 players instead of Whist's fixed four. */
.fh-grid { grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.fh-grid .kg-scorecell { cursor: default; }
@media (max-width: 859px) { .fh-grid { grid-template-columns: repeat(min(var(--n, 4), 3), minmax(0, 1fr)); } }
@media (max-width: 640px) { .fh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Progress towards the target, under each total. */
.fh-bar { height: 5px; border-radius: 4px; background: var(--border); margin: 12px 8px 0; overflow: hidden; }
.fh-bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }

/* Seat number on a picked chip — tap order is seating order. */
.fh-seatno {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent);
    font-size: 11px; font-weight: 700;
}

/* ── Ny runde ──────────────────────────────────────────────────── */
.fh-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fh-step-ctl { display: flex; align-items: stretch; height: 44px; }
.fh-step-ctl button {
    flex: none; width: 40px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font-size: 18px; cursor: pointer;
}
.fh-step-ctl button:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.fh-step-ctl button:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.fh-step-ctl button:active { background: var(--surface-sunk); }
.fh-step-ctl input {
    flex: 1; min-width: 0; width: 100%;
    border: 1px solid var(--border); border-left: 0; border-right: 0; border-radius: 0;
    text-align: center; font-family: var(--font-heading); font-weight: 600; font-size: 17px;
    padding: 0; margin: 0;
}
.fh-step-ctl input::-webkit-inner-spin-button,
.fh-step-ctl input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.fh-step-ctl input[type="number"] { -moz-appearance: textfield; }
.fh-out { flex: none; padding: 6px 12px; font-size: 13px; }
@media (max-width: 640px) { .fh-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Round history ─────────────────────────────────────────────── */
.fh-rparts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; min-width: 0; }
.fh-rpart { white-space: nowrap; }

/* ── Tables ────────────────────────────────────────────────────── */
.fh-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fh-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.fh-table th {
    font-family: var(--font-mono); font-size: 10px; font-weight: 500;
    text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint);
    text-align: right; padding: 0 8px 8px; border-bottom: 1px solid var(--border);
}
.fh-table td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.fh-table th:first-child, .fh-table td:first-child { text-align: left; padding-left: 0; }
.fh-table tr:last-child td { border-bottom: 0; }

/* Per-player joker line in Stillingen. */
.fh-jtable { display: grid; grid-template-columns: minmax(0, 1.2fr) auto auto 52px; gap: 8px 16px; font-size: 13.5px; align-items: center; }

/* Card values in Regler. */
.fh-kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; }

/* ── Joker-regnskab bars ───────────────────────────────────────── */
.fh-jrow { display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: center; }
.fh-jbar { display: flex; height: 10px; border-radius: 6px; background: var(--surface-sunk); overflow: hidden; }
.fh-jbar .ok  { background: var(--green); }
.fh-jbar .bad { background: var(--red); }
.fh-jnums { font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .fh-jrow { grid-template-columns: 1fr auto; gap: 6px 10px; }
    .fh-jbar { grid-column: 1 / -1; order: 3; }
    .fh-jtable { grid-template-columns: minmax(0, 1fr) auto auto; }
    .fh-jtable > :nth-child(4n) { display: none; }
}
