/* HandballNet 6.0 — competition, country and coverage surfaces. */

#hbn-pro .hbn6-overview,
#hbn-pro .hbn6-competition-grid,
#hbn-pro .hbn6-country-games,
#hbn-pro .hbn6-country-links > div { min-width: 0; }

.hbn6-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hbn6-overview > div {
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--hbn5-line);
  border-radius: 16px;
  background: var(--hbn5-surface);
}

.hbn6-overview span,
.hbn6-overview small { display: block; color: var(--hbn5-muted); font-size: 11px; }
.hbn6-overview b { display: block; margin: 7px 0 4px; color: var(--hbn5-ink); font-size: clamp(22px, 3vw, 31px); line-height: 1; letter-spacing: -.035em; }

.hbn6-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(135px, 1fr)) auto auto;
  gap: 9px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--hbn5-line);
  border-radius: 16px;
  background: var(--hbn5-soft);
}

.hbn6-filters label { display: grid; gap: 5px; min-width: 0; }
.hbn6-filters label > span { color: var(--hbn5-muted); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.hbn6-filters input,
.hbn6-filters select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--hbn5-line);
  border-radius: 10px;
  outline: 0;
  background: var(--hbn5-surface);
  color: var(--hbn5-ink);
  font: inherit;
  font-size: 12px;
}
.hbn6-filters input:focus,
.hbn6-filters select:focus { border-color: var(--hbn5-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hbn5-accent) 14%, transparent); }
.hbn6-filters button,
.hbn6-filters > a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--hbn5-accent);
  border-radius: 10px;
  background: var(--hbn5-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.hbn6-filters > a { border-color: var(--hbn5-line); background: var(--hbn5-surface); color: var(--hbn5-accent); }

.hbn6-directory {
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2.5vw, 20px);
  border: 1px solid var(--hbn5-line);
  border-radius: 18px;
  background: var(--hbn5-surface);
}
.hbn6-directory > header,
.hbn6-country-games > section > header {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.hbn6-directory > header span,
.hbn6-country-games > section > header span,
.hbn6-country-hero span { color: var(--hbn5-accent); font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hbn6-directory > header h2,
.hbn6-country-games h2 { margin: 3px 0 0; color: var(--hbn5-ink); font-size: 20px; }
.hbn6-directory > header > a { color: var(--hbn5-accent); font-size: 12px; font-weight: 850; text-decoration: none; }

.hbn6-competition-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.hbn6-competition-card {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 235px;
  padding: 15px;
  border: 1px solid var(--hbn5-line);
  border-radius: 15px;
  background: var(--hbn5-soft);
  color: var(--hbn5-ink);
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.hbn6-competition-card:hover,
.hbn6-competition-card:focus-visible { border-color: color-mix(in srgb, var(--hbn5-accent) 55%, var(--hbn5-line)); box-shadow: 0 10px 26px rgba(18, 47, 86, .09); transform: translateY(-2px); outline: 0; }
.hbn6-competition-card header { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.hbn6-competition-card header span { overflow: hidden; color: var(--hbn5-muted); font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.hbn6-competition-card header em { padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--hbn5-good) 13%, transparent); color: var(--hbn5-good); font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.hbn6-competition-card header em.is-archive { background: color-mix(in srgb, var(--hbn5-muted) 12%, transparent); color: var(--hbn5-muted); }
.hbn6-competition-card h2 { margin: 12px 0 5px; overflow: hidden; font-size: 16px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hbn6-competition-card > p { margin: 0 0 12px; color: var(--hbn5-muted); font-size: 11px; }
.hbn6-competition-card dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: auto 0 12px; }
.hbn6-competition-card dl div { min-width: 0; padding: 7px; border-radius: 9px; background: var(--hbn5-surface); }
.hbn6-competition-card dt { color: var(--hbn5-muted); font-size: 9px; }
.hbn6-competition-card dd { margin: 2px 0 0; font-size: 13px; font-weight: 900; }
.hbn6-coverage-meter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.hbn6-coverage-meter > span { height: 6px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--hbn5-line) 75%, transparent); }
.hbn6-coverage-meter i { display: block; width: var(--hbn6-progress, 0%); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hbn5-accent), var(--hbn5-good)); }
.hbn6-coverage-meter b { color: var(--hbn5-accent); font-size: 10px; }
.hbn6-competition-card > small { margin-top: 5px; color: var(--hbn5-muted); font-size: 9px; }

.hbn6-source-note {
  padding: 16px 18px;
  border-left: 4px solid var(--hbn5-accent);
  border-radius: 4px 14px 14px 4px;
  background: color-mix(in srgb, var(--hbn5-accent) 7%, var(--hbn5-surface));
}
.hbn6-source-note b { color: var(--hbn5-ink); font-size: 12px; }
.hbn6-source-note p { margin: 5px 0 0; color: var(--hbn5-muted); font-size: 11px; line-height: 1.65; }

.hbn6-country-links { display: grid; gap: 10px; }
.hbn6-country-links > h2 { margin: 0; font-size: 19px; }
.hbn6-country-links > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.hbn6-country-links a { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--hbn5-line); border-radius: 12px; background: var(--hbn5-surface); color: var(--hbn5-ink); text-decoration: none; }
.hbn6-country-links a:hover { border-color: var(--hbn5-accent); }
.hbn6-country-links b { font-size: 12px; }
.hbn6-country-links span { overflow: hidden; color: var(--hbn5-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.hbn6-country-hero {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid color-mix(in srgb, var(--hbn5-accent) 28%, var(--hbn5-line));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--hbn5-accent) 10%, var(--hbn5-surface)), var(--hbn5-surface));
}
.hbn6-country-hero h2 { margin: 5px 0; font-size: clamp(22px, 3.5vw, 32px); letter-spacing: -.035em; }
.hbn6-country-hero p { margin: 0; color: var(--hbn5-muted); font-size: 12px; }
.hbn6-country-hero > a { flex: none; padding: 9px 12px; border-radius: 10px; background: var(--hbn5-accent); color: #fff; font-size: 11px; font-weight: 850; text-decoration: none; }

.hbn6-country-games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hbn6-country-games > section { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 15px; border: 1px solid var(--hbn5-line); border-radius: 16px; background: var(--hbn5-surface); }
.hbn6-country-games .hbn5-games { min-width: 0; }
.hbn6-inline-empty { margin: 0; padding: 15px; border-radius: 10px; background: var(--hbn5-soft); color: var(--hbn5-muted); font-size: 11px; }

.hbn6-league-context { display: grid; gap: 12px; margin-bottom: 14px; padding: clamp(15px, 2.5vw, 21px); border: 1px solid var(--hbn5-line); border-radius: 17px; background: var(--hbn5-surface); }
.hbn6-league-context > header { display: flex; gap: 12px; align-items: end; justify-content: space-between; }
.hbn6-league-context > header span { color: var(--hbn5-accent); font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.hbn6-league-context > header h2 { margin: 4px 0 0; font-size: 20px; }
.hbn6-league-context > header a { color: var(--hbn5-accent); font-size: 11px; font-weight: 850; text-decoration: none; }
.hbn6-league-context > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.hbn6-league-context article { padding: 11px; border-radius: 10px; background: var(--hbn5-soft); }
.hbn6-league-context article span { display: block; color: var(--hbn5-muted); font-size: 9px; }
.hbn6-league-context article b { display: block; margin-top: 3px; font-size: 17px; }
.hbn6-league-context > p { margin: 0; padding: 10px 12px; border-left: 3px solid var(--hbn5-good); border-radius: 3px 10px 10px 3px; background: color-mix(in srgb, var(--hbn5-good) 8%, var(--hbn5-soft)); color: var(--hbn5-muted); font-size: 10px; line-height: 1.5; }
.hbn6-league-context > p.is-calculated { border-left-color: #b77700; background: color-mix(in srgb, #d59a22 9%, var(--hbn5-soft)); }
.hbn6-league-context > p strong { color: var(--hbn5-ink); }

@media (max-width: 1080px) {
  .hbn6-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbn6-filters button,
  .hbn6-filters > a { width: 100%; }
  .hbn6-competition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hbn6-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hbn6-competition-grid,
  .hbn6-country-games,
  .hbn6-country-links > div { grid-template-columns: 1fr; }
  .hbn6-country-hero { align-items: flex-start; flex-direction: column; }
  .hbn6-country-hero > a { width: 100%; text-align: center; }
  .hbn6-league-context > header { align-items: flex-start; flex-direction: column; }
  .hbn6-league-context > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hbn6-filters { grid-template-columns: 1fr; padding: 11px; }
  .hbn6-overview { gap: 7px; }
  .hbn6-overview > div { min-height: 92px; padding: 12px; }
  .hbn6-directory { padding: 11px; border-radius: 14px; }
  .hbn6-directory > header { align-items: flex-start; flex-direction: column; }
  .hbn6-competition-card { min-height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .hbn6-competition-card { transition: none; }
}
