/* Home page additions: the search field in the hero and the "Right now" section (home.js). Same cards, fonts and green as the rest of the page. */

.hero-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(clamp(560px, 40vw, 1000px), 100%);
    margin: 0 auto clamp(28px, 2vw, 44px);
    padding: clamp(14px, 1vw, 24px) clamp(18px, 1.3vw, 30px);
    background: rgba(17, 21, 29, 0.78);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-muted);
    font: inherit;
    font-size: clamp(15px, 1.15vw, 26px);
    text-align: left;
    cursor: text;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.hero-search:hover, .hero-search:focus-visible { border-color: rgba(174, 232, 117, 0.45); box-shadow: var(--primary-glow); outline: none; }
.hero-search svg { flex: none; color: var(--primary); }
.hero-search span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live { padding: 20px 0 70px; position: relative; z-index: 1; }
.live[hidden] { display: none; }
.live-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.live-head { max-width: 640px; margin-bottom: 26px; }

.lv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.lv-stat { padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lv-stat strong { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 400; color: var(--primary); line-height: 1.1; }
.lv-stat span { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.lv-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.lv-card { padding: 22px 22px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); min-width: 0; }
.lv-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lv-card-head h3 { font-family: var(--font-display); font-size: 21px; font-weight: 400; letter-spacing: 0.3px; }
.lv-more { font-size: 12.5px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }
.lv-more:hover { text-decoration: underline; }

.lv-list { display: flex; flex-direction: column; }
.lv-row { display: grid; grid-template-columns: 22px 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.lv-row:last-child { border-bottom: 0; }
.lv-row:hover .lv-name strong { color: var(--primary); }
.lv-rank { font-size: 12px; text-align: center; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lv-row:first-child .lv-rank { color: #ffd166; font-weight: 800; }
.lv-pic { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 10px; background: var(--surface-3); font-family: var(--font-display); color: var(--text-muted); }
.lv-pic.is-round { border-radius: 50%; }
.lv-pic img { width: 100%; height: 100%; object-fit: contain; }
.lv-pic.is-round img { object-fit: cover; object-position: top; }
.lv-name { display: flex; flex-direction: column; min-width: 0; }
.lv-name strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--fast); }
.lv-name small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-value { font-size: 15px; font-variant-numeric: tabular-nums; }

.lv-now { display: flex; flex-direction: column; gap: 14px; }
.lv-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl);
    color: var(--text); text-decoration: none; transition: border-color var(--fast) var(--ease); }
.lv-strip:hover { border-color: rgba(174, 232, 117, 0.35); }
.lv-strip-label { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.lv-strip strong { font-family: var(--font-display); font-size: 20px; font-weight: 400; }
.lv-strip-text { font-size: 13.5px; color: var(--text-dim); }
.lv-chips { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.lv-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 700; }
.lv-chip .lv-pic { width: 26px; height: 26px; border-radius: 50%; font-size: 12px; }
.lv-go { color: var(--text-muted); }

.lv-tours { display: grid; grid-template-columns: auto repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.lv-tour { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; transition: background var(--fast); }
.lv-tour:hover { background: var(--surface-2); }
.lv-tour img, .lv-tour-blank { width: 52px; height: 52px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-3); }
.lv-tour-blank { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); color: var(--text-muted); }
.lv-tour-text { display: flex; flex-direction: column; min-width: 0; }
.lv-tour-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-tour-text small { font-size: 12px; color: var(--text-muted); }

/* ---------- "What's on today" (today.js) ---------- */
.today { padding: 40px 0 10px; position: relative; z-index: 1; }
.today[hidden] { display: none; }
.td-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; max-width: none; }
.td-date { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.td-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.td-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px 20px 16px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--primary); border-radius: var(--radius-xl); }
.td-slot { display: contents; }
.td-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.td-head h3 { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 21px; font-weight: 400; letter-spacing: 0.3px; }
.td-ico { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 34px; height: 34px; font-size: 19px; color: var(--primary); background: rgba(174, 232, 117, 0.1); border: 1px solid rgba(174, 232, 117, 0.28); border-radius: 10px; }
.td-ico svg { display: block; }

.td-list { display: flex; flex-direction: column; }
.td-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 14px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.td-row:last-child { border-bottom: 0; }
.td-row:hover .td-main strong { color: var(--primary); }
.td-tag { padding: 3px 0; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; text-align: center; color: var(--text-dim); background: var(--surface-3); border-radius: 8px; font-variant-numeric: tabular-nums; }
.td-row--live .td-tag { color: #fff; background: #e5484d; animation: td-pulse 1.8s ease-in-out infinite; }
.td-row--ended .td-tag { color: var(--text-muted); background: transparent; border: 1px solid var(--border); }
.td-main { display: flex; flex-direction: column; min-width: 0; }
.td-main strong { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--fast); }
.td-main small { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-go { color: var(--text-muted); font-size: 18px; text-align: right; }

.td-empty { font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.td-empty a { color: var(--primary); font-weight: 700; }
.td-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

.td-scrims { display: grid; gap: 10px; }
.td-big { display: flex; align-items: baseline; gap: 10px; }
.td-big strong { font-family: var(--font-display); font-size: 44px; font-weight: 400; line-height: 1; color: var(--primary); }
.td-big span { font-size: 14px; color: var(--text-dim); }
.td-sub { font-size: 13px; color: var(--text-muted); }
.td-teams { display: flex; flex-wrap: wrap; gap: 8px; }
.td-team { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.td-team img, .td-team i { width: 26px; height: 26px; border-radius: 50%; object-fit: contain; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font: 400 12px var(--font-display); font-style: normal; color: var(--text-muted); }

@keyframes td-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) { .td-row--live .td-tag { animation: none; } }

@media (max-width: 980px) {
    .td-cards { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 980px) {
    .lv-cards { grid-template-columns: minmax(0, 1fr); }
    .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lv-tours { grid-template-columns: minmax(0, 1fr); }
    .lv-chips { margin-left: 0; }
}
@media (max-width: 560px) {
    .live { padding-bottom: 50px; }
    .lv-stat strong { font-size: 26px; }
    .hero-search { padding: 12px 16px; font-size: 14px; }
}
/* the smallest phones: two stat tiles side by side are about 110px each - a long label ("TOURNAMENTS") is let break, and the tile is tighter */
@media (max-width: 340px) {
    .lv-stat { padding: 14px 12px; }
    .lv-stat span { letter-spacing: 0.04em; overflow-wrap: anywhere; }
}
