/* tourney.royalarts.org — tourney.css | 2026-10-09 v1.00
   Small additions on top of the unchanged pools app.css + phone.css. */

.muted { color: var(--text); opacity: .8; font-size: 14px; line-height: 1.4; }
.content-pad-in { margin-left: 16px; margin-right: 16px; width: auto; }

h1 .ev-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
h1 .icon-btn.gear {
  background: rgba(146,188,247,.12); border-color: rgba(146,188,247,.25); color: #92bcf7;
}
.ev-meta { color: var(--text); font-size: 13px; margin: -8px 0 6px; }

/* ── Tabs reuse .pool-nav / .pool-btn; extra colours ── */
.tabs { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 8px 0 14px; -webkit-overflow-scrolling: touch; }
.tabs .pool-btn { flex: 1 1 0; min-width: 0; padding: 10px 4px; gap: 1px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.tabs .pool-btn .tab-n { font-size: 10px; font-weight: 600; opacity: .85; }
.tabs .pool-btn svg { width: 20px; height: 20px; }
.pool-btn.tab   { background: var(--level3); }
.pool-btn.blue  { background: #2b6fb0; }
.pool-btn.green { background: #2f7a4a; }
.pool-dot.blue  { background: #4a9ae0; }
.pool-dot.green { background: #4fbf72; }

/* ── Card extras ── */
.card .info .name .sub {
  display: block; font-size: 12px; font-weight: 400; color: var(--text); letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card.withdrawn { opacity: .45; }
.pool-badge.wd { color: var(--imperial-red); border-color: var(--imperial-red); opacity: 1; }
.card.place .av { font-family: Roboto, sans-serif; font-weight: 800; color: var(--owhite); }
.card.place.gold   .av { background: linear-gradient(135deg, #c9a227, #7a5f0c); }
.card.place.silver .av { background: linear-gradient(135deg, #b8b8b8, #5e5e5e); }
.card.place.bronze .av { background: linear-gradient(135deg, #b0673a, #5e3115); }

/* ── Entry cards: slimmer tap zones so names fit ── */
.card.entry .av { width: 52px; font-size: 20px; }
.card.entry [class^="act-"] { width: 44px; }
.card.entry .act-icon { width: 22px; height: 22px; }
.card.entry .info { padding: 0 8px; }

.de-byes { color: var(--text); font-size: 13px; opacity: .75; margin: 4px 0 8px; line-height: 1.5; }
.sidebar .btn-red, .sidebar .btn-blue, .sidebar .btn-green, .sidebar .btn-gray { color: #fff; }

/* ── Add-fencer row ── */
.add-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.add-row .textbox, .add-row .selectbox { flex: 1; width: auto; min-width: 0; margin-bottom: 0; font-size: 18px; }
.add-row .btn { flex-shrink: 0; }
.start-box { margin-top: 18px; }

/* ── Pool grid: tighter than pools so 7 fit on a phone ── */
.tgrid td, .tgrid th { padding: 2px; }
.tgrid .pool-green-sm, .tgrid .pool-red-sm, .tgrid .pool-white-sm,
.tgrid .pool-black-sm, .tgrid .pool-chorniy-sm {
  min-width: 34px; height: 38px; font-size: 18px; padding: 2px; cursor: pointer;
}
.tgrid .pool-black-sm { cursor: default; }
.tgrid .pool-fencer-sm { cursor: pointer; max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
.tgrid .wd-name { text-decoration: line-through; opacity: .6; }
.tgrid .stat { color: var(--owhite); font-size: 15px; text-align: center; min-width: 28px; background: transparent !important; }
.pool-label { font-weight: 700; }

/* ── Bout cards ── */
.bout-card { margin-left: 16px; margin-right: 16px; position: relative; }
.bout-card.now .bout-names { border-color: var(--highlight); }
.bout-names { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.bout-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--highlight);
}
.bout-card .av-r { border-radius: 0; }

.done-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px; margin: 3px 0; border-radius: 8px; background: rgba(255,255,255,.05);
  color: var(--text); font-size: 15px; cursor: pointer;
}
.done-row span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.done-row span:last-child { text-align: right; }
.done-row span.w { color: var(--green); font-weight: 700; }
.done-row b { color: var(--owhite); flex-shrink: 0; }

/* ── DE bracket (phone list) ── */
.de-round summary { cursor: pointer; list-style: none; }
.de-round summary::-webkit-details-marker { display: none; }
.de-card {
  border-radius: 12px; margin: 6px 0; overflow: hidden;
  background: var(--card-grad); border: 1px solid rgba(255,255,255,.06); box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.de-card.ready { border: 2px solid var(--purple); box-shadow: var(--purple-shadow); cursor: pointer; }
.de-card.done  { cursor: pointer; }
.de-card.bye   { opacity: .45; }
.de-line { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: var(--owhite); font-size: 16px; }
.de-line + .de-line { border-top: 1px solid rgba(255,255,255,.06); }
.de-line .seed { width: 24px; text-align: right; color: var(--text); font-size: 13px; flex-shrink: 0; }
.de-line .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.de-line .nm i { color: var(--text); opacity: .6; font-weight: 400; }
.de-line .sc { font-weight: 800; font-size: 20px; min-width: 28px; text-align: right; }
.de-line.w { background: rgba(149,231,149,.12); }
.de-line.w .nm { font-weight: 700; color: var(--green); }

/* ── Sidebar forms ── */
.lbl { display: block; color: var(--text); font-size: 13px; margin: 6px 0 4px; }
.w100b { width: 100%; box-sizing: border-box; }
.two { display: flex; gap: 10px; }
.two > div { flex: 1; }
.tie-opt { display: block; padding: 12px; margin: 6px 0; border-radius: 10px; background: var(--level2); font-size: 18px; }
.tie-opt input { transform: scale(1.4); margin-right: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.wbtn-p {
  background: rgba(146,188,247,.12); border: 1px solid rgba(146,188,247,.25); border-radius: 8px;
  color: #92bcf7; font-size: 13px; font-weight: 700; padding: 8px 10px; cursor: pointer;
}
.btn-armed { background: var(--imperial-red) !important; color: #fff !important; }

/* ── Toast ── */
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  max-width: 90vw; padding: 12px 18px; border-radius: 12px; z-index: 200;
  background: var(--imperial-red); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.6); transition: transform .2s ease; pointer-events: none;
}
#toast { opacity: 0; transition: transform .2s ease, opacity .2s ease; }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.good { background: var(--darkgreen); }

/* Sidebar buttons: force white text (app.css colours sidebar links dark) */
#sidebarBody .btn { color: #fff !important; }
#sidebarBody .btn svg { fill: currentColor; }

/* "Also enter in" checkboxes under the add-fencer row */
.add-row { flex-wrap: wrap; }
.also-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.also-lbl { color: var(--text); font-size: 13px; }
.also-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  background: rgba(146,188,247,.12); border: 1px solid rgba(146,188,247,.25); color: #92bcf7; font-size: 14px; font-weight: 700;
}
.also-chip input { transform: scale(1.3); }
.also-chip:has(input:checked) { background: var(--level4); color: #fff; border-color: var(--level4); }

/* ── 2026-10-11: tournaments on the home screen ── */
.tour-head { display: flex; align-items: center; gap: 10px; margin-top: 22px; margin-bottom: 6px;
  padding-bottom: 6px; border-bottom: 1px solid rgba(146,188,247,.25); }
.tour-head .tour-txt { flex: 1; min-width: 0; }
.tour-name { color: var(--owhite); font-size: 18px; font-weight: 800; line-height: 1.2; }
.tour-date { color: var(--text); font-size: 13px; margin-top: 2px; }
.tour-head.today .tour-date { color: #92bcf7; font-weight: 700; }
.tour-head .icon-btn.gear { background: rgba(146,188,247,.12); border-color: rgba(146,188,247,.25); color: #92bcf7; flex-shrink: 0; }
.tour-add { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-top: 4px; margin-bottom: 4px;
  border: 1px dashed rgba(146,188,247,.35); border-radius: 10px; color: #92bcf7; font-size: 14px; font-weight: 700; cursor: pointer; }
.tour-add svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.ev-tour { color: #92bcf7; font-size: 13px; font-weight: 700; margin: -10px 0 10px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Lock ── */
.lock-tag { display: inline-flex; align-items: center; gap: 4px; color: #e8c34a; font-weight: 700; }
.lock-tag svg { width: 13px; height: 13px; fill: currentColor; }

/* ── Club / rating ── */
.club-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .5px; color: var(--text);
  opacity: .75; margin-left: 4px; vertical-align: middle; }
.de-line .club-tag { font-size: 11px; }
.entry-extra { flex: 0 0 100%; min-width: 0; max-width: 100%; display: flex; gap: 8px; }
.entry-extra .textbox { flex: 1 1 0; width: auto; min-width: 0; box-sizing: border-box; margin-bottom: 0; font-size: 16px; }
.entry-extra .rt { flex: 0 0 84px; }
.entry-extra .pt { flex: 0 0 66px; }
/* pool sheet: club under the name so the grid doesn't widen */
.tgrid .club-tag { display: block; margin: 1px 0 0; font-size: 9px; line-height: 1; }

/* DE rounds: show that a folded round opens */
.de-round summary.section-head::before { content: '▸'; margin-right: 6px; font-size: 12px; }
.de-round[open] summary.section-head::before { content: '▾'; }

/* ── Staff sign-in button (home header) ── */
.staff-btn { display: inline-flex; align-items: center; gap: 5px; opacity: .55; }
.staff-btn.on { opacity: 1; background: rgba(149,231,149,.14) !important; border-color: rgba(149,231,149,.35) !important; color: var(--green) !important; }
.staff-btn span { font-size: 12px; font-weight: 700; }

/* ── Competitor search results under the add-fencer row ── */
.find-list { flex-basis: 100%; display: flex; flex-direction: column; gap: 4px; }
.find-list:empty { display: none; }
.find-item { display: flex; flex-direction: column; align-items: flex-start; text-align: left; width: 100%;
  padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(146,188,247,.3); background: rgba(146,188,247,.1); cursor: pointer; }
.find-item .fn { color: var(--owhite); font-size: 17px; font-weight: 700; }
.find-item .fs { color: var(--text); font-size: 12px; }
.find-item.entered { opacity: .45; cursor: default; }

/* ── Helper PIN display (tournament ⚙) ── */
.pin-box { font-family: Roboto, monospace; font-size: 40px; font-weight: 800; letter-spacing: 8px; text-align: center;
  color: var(--owhite); background: var(--level2); border-radius: 12px; padding: 12px 0; margin: 4px 0 10px; }

/* ── One-box fencer search (2026-10-11) ── */
.add-row .find-q { flex: 1 1 100%; font-size: 20px; }
.find-item.hl { border-color: var(--highlight, #92bcf7); background: rgba(146,188,247,.24); box-shadow: 0 0 0 1px rgba(146,188,247,.5) inset; }
.find-item.new .fn { color: #92bcf7; }
.find-item.new { border-style: dashed; }

/* ── Check-in by fencer (2026-10-11) ── */
.ci-btn { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(149,231,149,.14); border: 1px solid rgba(149,231,149,.35); color: var(--green); font-weight: 700; font-size: 14px; }
.ci-btn svg { width: 16px; height: 18px; fill: currentColor; }
.ci-hint { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; color: #92bcf7; font-size: 14px; font-weight: 700; cursor: pointer; }
.ci-hint svg { width: 14px; height: 16px; fill: currentColor; }
#ci .find-list { margin: 6px 0; }
.ci-card { margin-top: 8px; padding: 12px; border-radius: 12px; background: var(--level2); }
.ci-name { color: var(--owhite); font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.ci-ev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin: 6px 0; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid rgba(146,188,247,.2); }
.ci-ev:has(input:checked) { background: rgba(149,231,149,.12); border-color: rgba(149,231,149,.45); }
.ci-ev input { transform: scale(1.5); flex-shrink: 0; }
.ci-ev span { display: flex; flex-direction: column; }
.ci-ev b { color: var(--owhite); font-size: 17px; }
.ci-ev small { color: var(--text); font-size: 12px; }
