/* Page styles: doubles area. Owned by its views; tokens and shared components live in ../app.css. */
/* Ladder (/), team (/teams/:id) and match feed (/matches). Values from Main, LadderStates,
   Team and AllMatches artboards. Prefix: .dbl- */

.dbl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 46px; }
.dbl-toggle-slot:empty { display: none; }
.dbl-self-start { align-self: flex-start; }
.dbl-inherit { color: inherit; text-decoration: none; }
.dbl-inherit:hover { color: inherit; text-decoration: underline; }
.dbl-namecol { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Leader card and ladder rows */
.dbl-leader-top { display: flex; justify-content: space-between; align-items: center; }
.dbl-leader-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.dbl-figures { display: flex; align-items: baseline; gap: 8px; }
.dbl-figures.unplayed { gap: 6px; }
.ladder-row.unplayed .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ladder-row.unplayed .rank { font-size: 24px; }
.dbl-unplayed-h { margin: 10px 0 0; }
.section-head > [hidden] { display: none; }

/* Recent matches */
.dbl-recent { padding: 26px var(--gutter) 0; display: flex; flex-direction: column; }
.dbl-recent:empty { display: none; }
.dbl-voided .feed-line .w, .dbl-voided .feed-line .l { text-decoration: line-through; }
.dbl-voided .feed-line .w { color: var(--subtle); }
.dbl-voided .feed-deltas { color: var(--subtle); }

/* Team page */
.dbl-team-head { padding: 10px var(--gutter) 22px; display: flex; flex-direction: column; gap: 16px; }
.dbl-loading-title { color: transparent; background: var(--surface); border-radius: 8px; width: 70%; }
.dbl-rank { font-size: 13px; font-weight: 600; color: var(--gold); }
.dbl-titles { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.dbl-title { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--gold); }
.dbl-actions { display: flex; gap: 8px; }
.dbl-actions > .btn { flex: 1; height: 48px; padding: 0 12px; }
.dbl-history { padding: 6px var(--gutter) 40px; display: flex; flex-direction: column; }
.dbl-history:empty { display: none; }
.dbl-hist-h { margin: 0 0 6px; }
a.hist-opp { display: block; color: var(--ink); }
.dbl-hist-figs { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.hist-delta.up { color: var(--ink); }
.hist-delta.down { color: var(--subtle); }
.dbl-void-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dbl-void-title { font-size: 15px; }
.dbl-none { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.result-chip { box-sizing: border-box; }

/* All matches */
.dbl-feed-head { padding: 10px var(--gutter) 14px; display: flex; flex-direction: column; gap: 16px; border-bottom: 1px solid var(--line); }
.dbl-filter { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle); }
.dbl-select { height: 44px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); padding: 0 12px; font: 500 15px var(--font-body); letter-spacing: 0; text-transform: none; }
.dbl-select:disabled { color: var(--subtle); }
.dbl-feed-status { padding: 16px var(--gutter) 0; }
.dbl-feed-status:empty { display: none; }
.dbl-feed { list-style: none; margin: 0; padding: 0 var(--gutter); }
.dbl-feed > li { border-bottom: 1px solid var(--line); }
.dbl-feed-btn {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 4px 10px; align-items: start;
  padding: 14px 0; background: transparent; border: 0; text-align: left; color: var(--ink); font: inherit; cursor: pointer;
}
.dbl-feed-btn.voided { color: var(--subtle); }
.dbl-feed-seq { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--subtle); font-variant-numeric: tabular-nums; padding-top: 1px; }
.dbl-feed-teams { gap: 3px; }
.dbl-feed-w { font-size: 15px; font-weight: 600; }
.dbl-feed-l { font-size: 14px; color: var(--muted); }
.dbl-feed-btn.voided .dbl-feed-w, .dbl-feed-btn.voided .dbl-feed-l { text-decoration: line-through; }
.dbl-feed-meta { font-size: 12px; color: var(--subtle); }
.dbl-feed-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.dbl-feed-deltas { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dbl-feed-panel { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px 48px; }
.dbl-feed-panel[hidden] { display: none; }
.dbl-feed-audit { margin: 0; padding: 12px 12px 12px 30px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-card); display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 1.4; color: var(--soft-ink); }
.dbl-feed-audit strong { color: var(--ink); }
.dbl-feed-panel > .btn.ghost { height: auto; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.dbl-more-wrap { display: flex; justify-content: center; padding: 16px; }
.dbl-more-wrap[hidden] { display: none; }
.dbl-more { min-height: 44px; padding: 0 18px; border-radius: 10px; background: transparent; border: 1px solid var(--border); color: var(--muted); font: 600 14px var(--font-body); }
.dbl-more:hover { color: var(--ink); }

/* Narrow phones (<=340 px): keep the Season/All-time toggle on one line and inside the screen. */
.dbl-toggle-slot { flex-shrink: 0; }
.dbl-toggle-slot .seg > button { white-space: nowrap; }
@media (max-width: 340px) {
  .dbl-toggle-slot .seg > button { padding: 0 10px; }
  .page-title { font-size: 44px; }
}
