/*---------------------------------------------------------
    HERA SCREEN VIEWS — 배팅내역

    Ours, not the export's, for the same reason as `screens.css`.

    hera ships `bethistory.css` and it describes exactly the design restated
    below — a card per slip over a summary bar, a ten-column leg table, round
    pager buttons. It is still not loaded, because it opens with

        * { box-sizing: border-box; margin: 0; padding: 0; }
        #body { background-color: …; font-family: …; color: … }

    and then claims `.btn`, `.col`, `.status-tag` and `.no_list_box` unscoped.
    Those are four of the commonest class names on this site and the reset is
    unlayered, so it would beat every utility on any route it reached —
    `sports_csr.css` is the standing proof of what that costs.

    So: every selector here begins with `.hera-screen`, which the skin's own view
    is the only thing that renders. On a route that draws no such root, this
    file matches nothing. `skin-screen-seam.spec.ts` reads it and fails on any
    selector that escapes, on any of those three resets, on a path into the
    other skin's directory, and on a breakpoint that is not one of the site's
    two.

    **The two widths.** 767 is where every list on the site turns into cards
    (`lib/table-cards.ts`), and this table does it the way the legacy sheets do:
    `.hera-detail-head` hides and each cell prints its own heading out of
    `data-label`. Between 768 and the table's natural width the slip card
    scrolls sideways inside its own box rather than the page doing it, which is
    what the export does below 1200 — an inner scroll region, not a squeezed
    grid.
---------------------------------------------------------*/

.hera-screen.hera-bethistory {
    --hera-bh-card: #1a1d2a;
    --hera-bh-head: #252936;
    --hera-bh-line: #2c3a56;
    --hera-bh-ink: #e0e7ff;
    --hera-bh-dim: #8a9cb3;
    --hera-bh-accent: #00bfff;
    --hera-bh-base: #0d1018;
    display: block;
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 20px;
}

/* --- tabs ---------------------------------------------------------------- */

.hera-screen.hera-bethistory > .hera-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--hera-bh-line);
}

/*
   `flex: 0 0 auto` 와 `border-radius: 0` 은 이 화면이 아니라 **옆 화면을 되돌리는**
   줄입니다. `hera-tab` 은 seam 검사의 SHARED 목록에 있는 공유 이름이고,
   `screens.css` 의 것은 테더 전환 띠 — `flex: 1 1 0` 로 한 줄을 균등분할하고
   모서리를 8px 둥글립니다. 여기서 그것을 끄지 않아 1280 에서 탭 셋이 1240px 를
   406.7px 씩 나눠 갖고 있었습니다. 원본 `.tab-item` 은 `padding: 15px 30px` 만
   가진 글자폭 탭이고 왼쪽에 모여 있습니다(bethistory.css:31).
   폰에서 균등분할이 되는 것은 원본도 그렇게 하기 때문이고(`flex-grow: 1`,
   :171), 그것은 아래 767 블록이 따로 켭니다.                                */
.hera-screen.hera-bethistory > .hera-tabs > .hera-tab {
    flex: 0 0 auto;
    padding: 15px 30px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: none;
    color: var(--hera-bh-dim);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hera-screen.hera-bethistory > .hera-tabs > .hera-tab:hover {
    color: var(--hera-bh-ink);
}

.hera-screen.hera-bethistory > .hera-tabs > .hera-tab.hera-tab-on {
    color: var(--hera-bh-accent);
    border-bottom-color: var(--hera-bh-accent);
}

/* --- one slip ------------------------------------------------------------ */

.hera-screen.hera-bethistory .hera-slip-card {
    background-color: var(--hera-bh-card);
    border: 1px solid var(--hera-bh-line);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hera-screen.hera-bethistory .hera-slip-body {
    padding: 10px;
    min-width: 880px;
}

.hera-screen.hera-bethistory .hera-detail-head,
.hera-screen.hera-bethistory .hera-detail-row {
    display: grid;
    grid-template-columns:
        1.5fr 1.5fr 1.5fr 0.8fr 1.5fr 1.5fr 1.5fr 1fr 1fr 1fr;
    gap: 5px;
}

.hera-screen.hera-bethistory .hera-detail-head {
    padding: 0 15px 10px;
    border-bottom: 2px solid var(--hera-bh-line);
    font-size: 12px;
    font-weight: 600;
    color: var(--hera-bh-dim);
    text-align: center;
}

.hera-screen.hera-bethistory .hera-detail-row {
    align-items: center;
    padding: 8px 15px;
    border-bottom: 1px solid var(--hera-bh-line);
    font-size: 13px;
    color: var(--hera-bh-ink);
}

.hera-screen.hera-bethistory .hera-detail-row:last-child {
    border-bottom: none;
}

.hera-screen.hera-bethistory .hera-detail-row > .hera-col {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hera-screen.hera-bethistory .hera-col-league,
.hera-screen.hera-bethistory .hera-col-market,
.hera-screen.hera-bethistory .hera-col-pick {
    text-align: left;
}

/* The side the selector lit up. `.sel-pick` on the legacy board. */
.hera-screen.hera-bethistory .hera-detail-row > .hera-col.hera-picked {
    color: var(--hera-bh-accent);
    font-weight: 600;
}

.hera-screen.hera-bethistory .hera-bet-rate {
    font-weight: 600;
    color: var(--hera-bh-accent);
}

.hera-screen.hera-bethistory .hera-bet-rate-void {
    color: var(--hera-bh-dim);
    text-decoration: line-through;
}

.hera-screen.hera-bethistory .hera-bonus-name {
    color: #74f725;
    font-weight: 600;
}

/*
   적특 · 환불 · 보너스 제외, spelled out under the legs. The badge alone says a
   leg was neither a win nor a loss without saying what that did to the money,
   so this block is never decoration — see `bet-history-model.ts`.
*/
.hera-screen.hera-bethistory .hera-slip-notes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 15px 4px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--hera-bh-dim);
}

/* --- the summary bar under each slip ------------------------------------- */

.hera-screen.hera-bethistory .hera-slip-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 25px;
    margin-bottom: 20px;
    padding: 15px 25px;
    background-color: var(--hera-bh-head);
    border: 1px solid var(--hera-bh-line);
    border-top: 1px solid #454c5e;
    border-radius: 0 0 12px 12px;
}

.hera-screen.hera-bethistory .hera-summary-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.hera-screen.hera-bethistory .hera-summary-item > label {
    font-size: 12px;
    color: var(--hera-bh-dim);
    white-space: nowrap;
}

.hera-screen.hera-bethistory .hera-summary-item > span {
    font-size: 15px;
    font-weight: 600;
    color: #c5c5c5;
}

.hera-screen.hera-bethistory .hera-money {
    color: var(--hera-bh-accent);
}

.hera-screen.hera-bethistory .hera-bonus-chip {
    padding: 2px 8px;
    border: 1px solid rgba(233, 189, 98, 0.5);
    border-radius: 3px;
    background: rgba(233, 189, 98, 0.1);
    font-size: 11px;
    font-weight: 600;
    color: #e9bd62;
}

.hera-screen.hera-bethistory .hera-bonus-chip-off {
    border-color: var(--hera-bh-line);
    background: transparent;
    color: var(--hera-bh-dim);
    text-decoration: line-through;
}

.hera-screen.hera-bethistory .hera-summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* --- state pills --------------------------------------------------------- */

.hera-screen.hera-bethistory .hera-bet-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-won {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-lost {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-void,
.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-cancelled {
    background-color: rgba(138, 156, 179, 0.1);
    color: #8a9cb3;
}

/* The leg cell's pill is the export's filled one, not the tinted summary one. */
.hera-screen.hera-bethistory .hera-bet-tag.hera-bet-tag-sm {
    min-width: 54px;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 12px;
    text-align: center;
    letter-spacing: 0.5px;
    color: #fff;
}

.hera-screen.hera-bethistory .hera-bet-tag-sm.hera-bet-won {
    background: #257af7;
    color: #fff;
}

.hera-screen.hera-bethistory .hera-bet-tag-sm.hera-bet-lost {
    background: #ed2424;
    color: #fff;
}

.hera-screen.hera-bethistory .hera-bet-tag-sm.hera-bet-pending {
    background: #8c8c8c;
    color: #fff;
}

.hera-screen.hera-bethistory .hera-bet-tag-sm.hera-bet-void {
    background: #ffb300;
    color: #fff;
}

.hera-screen.hera-bethistory .hera-bet-tag-sm.hera-bet-cancelled {
    background: #222;
    color: #fff;
}

/* --- footer -------------------------------------------------------------- */

.hera-screen.hera-bethistory .hera-no-list {
    padding: 80px 0;
    text-align: center;
    color: var(--hera-bh-dim);
}

.hera-screen.hera-bethistory .hera-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hera-screen.hera-bethistory .hera-list-footer > .hera-listpagenation {
    margin-left: auto;
}

.hera-screen.hera-bethistory .hera-btn-danger {
    border: 1px solid #ef4444;
    background-color: transparent;
    color: #ef4444;
}

.hera-screen.hera-bethistory .hera-btn-danger:hover:enabled {
    background-color: #ef4444;
    color: #fff;
}

/* --- phone --------------------------------------------------------------- */

@media (max-width: 767px) {
    .hera-screen.hera-bethistory {
        margin: 16px auto;
        padding: 0 10px;
    }

    .hera-screen.hera-bethistory > .hera-tabs {
        gap: 0;
        margin-bottom: 16px;
    }

    .hera-screen.hera-bethistory > .hera-tabs > .hera-tab {
        flex: 1 1 0;
        padding: 12px 5px;
        font-size: 13px;
        text-align: center;
    }

    .hera-screen.hera-bethistory .hera-slip-card {
        overflow-x: visible;
    }

    .hera-screen.hera-bethistory .hera-slip-body {
        min-width: 0;
    }

    /* The head disappears and every cell carries its own heading, which is
       what `data-label` is on the row for. */
    .hera-screen.hera-bethistory .hera-detail-head {
        display: none;
    }

    /* The same card the rest of this skin's lists become — see `screens.css`
       under 「the export's table-to-card, at the site's width」. */
    .hera-screen.hera-bethistory .hera-detail-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        margin-bottom: 12px;
        padding: 16px;
        border: 1px solid var(--hera-bh-line);
        border-radius: 8px;
    }

    .hera-screen.hera-bethistory .hera-detail-row > .hera-col {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        text-align: right;
    }

    .hera-screen.hera-bethistory .hera-detail-row > .hera-col::before {
        content: attr(data-label);
        flex: 0 0 auto;
        font-size: 12px;
        font-weight: 600;
        color: var(--hera-bh-dim);
    }

    /* A cell the export leaves blank on the bonus row has nothing to caption. */
    .hera-screen.hera-bethistory .hera-detail-row > .hera-col:empty {
        display: none;
    }

    .hera-screen.hera-bethistory .hera-slip-summary {
        gap: 10px 16px;
        padding: 12px 14px;
    }

    .hera-screen.hera-bethistory .hera-summary-actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-end;
    }

    .hera-screen.hera-bethistory .hera-list-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .hera-screen.hera-bethistory .hera-list-footer > .hera-listpagenation {
        margin-left: 0;
    }
}
