/* Handkast Tournaments – scoped to .hk-tournaments */
.hk-tournaments {
  --hk-bg: #ffffff;
  --hk-muted: #8e929a;
  --hk-text: #25272d;
  --hk-accent: #344cff;
  --hk-border: #e1e4eb;
  --hk-radius: 16px;
  --hk-shadow: 0 8px 22px rgba(22, 31, 55, .08);

  max-width: 100%;
  margin: 8px auto;
  padding: 14px;
  color: var(--hk-text);
  background: var(--hk-bg);
  border: 1px solid var(--hk-border);
  border-radius: var(--hk-radius);
  box-shadow: var(--hk-shadow);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.hk-tournaments-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 2px 8px;
  border-bottom: 2px solid #e5e8f0;
}

.hk-tournaments-title {
  display: flex;
  align-items: center;
  min-height: 32px;
  margin: 0;
  color: var(--hk-text);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hk-tournaments-title::before {
  content: '';
  flex: 0 0 4px;
  width: 4px;
  height: 18px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--hk-accent);
}

.hk-tournaments-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.hk-tournaments-picker label {
  color: var(--hk-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hk-tournaments-select {
  max-width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--hk-text);
  background: #f7f8fb;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.hk-tournaments-select:focus-visible {
  outline: 2px solid var(--hk-accent);
  outline-offset: 2px;
}

.hk-tournaments-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e3e7ef;
  border-radius: 10px;
}

.hk-tournaments-table {
  width: 100%;
  min-width: 380px;
  border-collapse: collapse;
  background: #ffffff;
}

.hk-tournaments-table th,
.hk-tournaments-table td {
  padding: 4px 8px;
  color: #3b3f48;
  line-height: 1;
  font-size: 14px;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
  vertical-align: middle;
}

.hk-tournaments-table th {
  position: sticky;
  top: 0;
  color: var(--hk-muted);
  background: #f7f8fb;
  border-bottom: 1px solid #e3e7ef;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hk-tournaments-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid #e6e9ef;
}

.hk-tournaments-table tbody tr:hover td { background: #f7f8ff; }

.hk-tournaments-table tr.is-highlight td { background: rgba(52, 76, 255, .07); }
.hk-tournaments-table tr.is-highlight:hover td { background: rgba(52, 76, 255, .12); }
.hk-tournaments-table tr.is-highlight .hk-tournaments-pos { box-shadow: inset 3px 0 0 var(--hk-accent); }

.hk-tournaments-table th:first-child,
.hk-tournaments-table td:first-child {
  width: 28px;
  padding-left: 12px;
  padding-right: 4px;
  color: var(--hk-muted);
  font-weight: 700;
  text-align: left;
}

.hk-tournaments-table th:nth-child(2),
.hk-tournaments-table td:nth-child(2) {
  width: auto;
  padding: 6px 8px 6px 10px;
  text-align: left;
}

.hk-tournaments-table th:nth-child(3),
.hk-tournaments-table td:nth-child(3),
.hk-tournaments-table th:nth-child(4),
.hk-tournaments-table td:nth-child(4),
.hk-tournaments-table th:nth-child(5),
.hk-tournaments-table td:nth-child(5),
.hk-tournaments-table th:nth-child(6),
.hk-tournaments-table td:nth-child(6) { width: 30px; }

.hk-tournaments-table th:nth-child(7),
.hk-tournaments-table td:nth-child(7) { width: 42px; }

.hk-tournaments-table th:nth-child(8),
.hk-tournaments-table td:nth-child(8) { width: 38px; padding-right: 12px; }

.hk-tournaments-team {
  display: flex;
  align-items: center;
  min-width: 0;
}

.hk-tournaments-logo {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  margin-right: 8px;
  overflow: hidden;
}

.hk-tournaments-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hk-tournaments-team span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 650;
}

.hk-tournaments-message {
  padding: 16px 14px;
  color: var(--hk-muted);
  background: #f8f9fc;
  border: 1px solid #e3e7ef;
  border-radius: 10px;
  font-size: 14px;
}

.hk-tournaments-message.is-error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

@media (max-width: 479px) {
  .hk-tournaments-table { min-width: 0; }

  .hk-tournaments-table th,
  .hk-tournaments-table td { padding: 3px; }

  .hk-tournaments-table td { font-size: 11px; }

  .hk-tournaments-table th:first-child,
  .hk-tournaments-table td:first-child { width: 18px; padding-left: 6px; padding-right: 2px; }

  .hk-tournaments-table th:nth-child(2),
  .hk-tournaments-table td:nth-child(2) { padding-left: 6px; }

  .hk-tournaments-table th:nth-child(3),
  .hk-tournaments-table td:nth-child(3),
  .hk-tournaments-table th:nth-child(4),
  .hk-tournaments-table td:nth-child(4),
  .hk-tournaments-table th:nth-child(5),
  .hk-tournaments-table td:nth-child(5),
  .hk-tournaments-table th:nth-child(6),
  .hk-tournaments-table td:nth-child(6) { width: 20px; }

  .hk-tournaments-table th:nth-child(7),
  .hk-tournaments-table td:nth-child(7) { width: 30px; }

  .hk-tournaments-table th:nth-child(8),
  .hk-tournaments-table td:nth-child(8) { width: 26px; padding-right: 6px; }

  .hk-tournaments-logo { flex-basis: 20px; width: 20px; height: 20px; margin-right: 6px; }

  .hk-tournaments-picker { width: 100%; }
  .hk-tournaments-select { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hk-tournaments * { animation: none !important; transition: none !important; }
}
