/* Kriket görünümü — mevcut tasarım dili (değişkenler style.css'ten) */

/* ---------- spor değiştirici ---------- */
.sports {
  display: flex;
  gap: 6px;
  padding: 8px 16px 0;
  background: var(--bg);
}
.sport {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  border-radius: 10px 10px 0 0;
  background: var(--surface);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.sport:hover { color: var(--text); background: var(--surface-2); }
.sport.active {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--line);
  box-shadow: inset 0 2px 0 var(--accent);
}
.sport-ico { font-size: 15px; line-height: 1; }
.sport-count {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

/* ---------- liste ---------- */
.cricket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 16px 24px;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.cric-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cric-league {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}
.cric-league .lg-star {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  padding: 2px;
  cursor: pointer;
}
.cric-league .lg-star.on { color: var(--star); }
.lg-img { width: 18px; height: 18px; object-fit: contain; }
.lg-name { font-weight: 650; font-size: 13.5px; }
.lg-season { color: var(--muted); font-size: 11.5px; }
.lg-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1px 6px;
}
.lg-caret { color: var(--muted); font-size: 11px; transition: transform .18s; }
.cric-group.collapsed .lg-caret { transform: rotate(-90deg); }
.cric-group.collapsed .cric-matches { display: none; }

.cric-matches { display: flex; flex-direction: column; }

/* ---------- maç satırı ---------- */
.cric-match {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 30px;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s;
}
.cric-match:last-child { border-bottom: 0; }
.cric-match:hover, .cric-match:focus-visible {
  background: var(--surface-2);
  outline: none;
}
.cric-match.is-live { box-shadow: inset 3px 0 0 var(--danger); }

.cm-state { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.cm-state-txt {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cm-state-txt.live { color: var(--danger); }
.cm-type {
  font-size: 9.5px;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  white-space: nowrap;
  letter-spacing: .2px;
}

.cm-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cm-team { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; }
.cm-logo, .cm-team .logo-ph {
  width: 22px; height: 22px;
  object-fit: contain;
  border-radius: 5px;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: var(--muted);
}
.cm-name {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex; align-items: center; gap: 5px;
}
.cm-team.won .cm-name { font-weight: 700; }
.cm-bat { font-size: 11px; opacity: .85; }
.cm-score { font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 650; text-align: right; white-space: nowrap; }
.sc { color: var(--text); }
.sc-live { color: var(--accent); }
.sc-sep { color: var(--muted); margin: 0 4px; font-weight: 400; }
.sc-none { color: var(--muted); }
.cm-note {
  font-size: 10.5px;
  color: var(--muted);
  padding-left: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cm-star {
  border: 0; background: transparent; color: var(--muted);
  font-size: 15px; cursor: pointer; padding: 4px;
  align-self: start;
}
.cm-star.on { color: var(--star); }

/* ---------- maç merkezi ---------- */
.cd-head {
  padding: 14px 4px 10px;
  border-bottom: 1px solid var(--line);
}
.cd-league {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted); margin-bottom: 12px;
}
.cd-league img { width: 16px; height: 16px; object-fit: contain; }
.cd-league small { color: var(--muted); opacity: .8; }

.cd-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.cd-team { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.cd-logo, .cd-team .logo-ph {
  width: 46px; height: 46px; object-fit: contain;
  border-radius: 10px; background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--muted);
}
.cd-tname { font-size: 13px; font-weight: 650; }
.cd-tscore { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--accent); }
.cd-vs { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cd-state { font-size: 12px; font-weight: 700; color: var(--muted); }
.cd-state.live { color: var(--danger); }
.cd-type { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.cd-note { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted); }
.cd-toss { margin-top: 8px; text-align: center; font-size: 11.5px; color: var(--muted); }

/* Futbol panelinin yarı saydam perdesi, kriketin daha geniş listesinde
   arkadaki satırları okunur gibi gösteriyordu — kriket için perde kapatılır. */
body[data-sport="cricket"] .detail { background: rgba(6, 8, 12, 0.88); backdrop-filter: blur(3px); }
body[data-sport="cricket"] .detail-inner { max-width: 700px; }

.cd-tabs {
  margin-top: 10px;
  /* dar ekranda sayfayı taşırmak yerine şerit yatay kayar */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.cd-tabs::-webkit-scrollbar { display: none; }
.cd-tabs button { flex: 0 0 auto; white-space: nowrap; }
.cd-body { padding: 16px 2px 8px; }

.cd-innings { margin-bottom: 18px; }
.cd-inn-head {
  font-size: 12.5px; font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: baseline; gap: 6px;
}
.cd-inn-head small { color: var(--muted); font-weight: 400; font-size: 10.5px; }

.cd-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cd-table th {
  font-size: 10.5px; font-weight: 600; color: var(--muted);
  text-align: right; padding: 5px 6px; border-bottom: 1px solid var(--line);
}
.cd-table th.l, .cd-table td.l { text-align: left; }
.cd-table td { text-align: right; padding: 6px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cd-table tr:last-child td { border-bottom: 0; }
.cd-table tr.is-active { background: var(--accent-soft); }
.notout { color: var(--accent); font-weight: 700; }
.live-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--danger); margin-left: 4px; vertical-align: middle;
}

.cd-grid { display: grid; gap: 8px; }
.cd-player {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border: 1px solid var(--line); border-radius: 10px;
}
.cd-player img, .cd-pavatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.cd-pinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cd-pinfo b { font-size: 12.5px; font-weight: 600; }
.cd-pinfo small { color: var(--muted); font-size: 11px; }

.cd-info { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cd-info th {
  text-align: left; font-weight: 600; color: var(--muted);
  padding: 7px 0; width: 40%; vertical-align: top;
}
.cd-info td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cd-info tr:last-child td { border-bottom: 0; }

.empty { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 12px; }
.error {
  margin: 16px 12px; padding: 12px 14px;
  border: 1px solid var(--danger); border-radius: 10px;
  color: var(--danger); font-size: 13px;
}

/* ---------- mobil ---------- */
@media (max-width: 520px) {
  .sports { padding: 8px 10px 0; gap: 4px; }
  .sport { padding: 7px 11px; font-size: 12.5px; }
  .cricket-list { padding: 8px 8px 20px; }
  .cric-match { grid-template-columns: 62px 1fr 28px; gap: 7px; padding: 10px 9px; }
  .cm-name { font-size: 12.5px; }
  .cm-score { font-size: 12px; }
  .cm-state-txt { font-size: 10.5px; }
  .cd-teams { gap: 4px; }
  .cd-logo, .cd-team .logo-ph { width: 38px; height: 38px; }
  .cd-tname { font-size: 11.5px; }
  .cd-tscore { font-size: 13px; }
  .cd-table { font-size: 11px; }
  .cd-table td, .cd-table th { padding: 5px 3px; }
}
