:root {
  --judge-green: #85c988;
  --judge-green-dark: rgb(113, 179, 116);
  --judge-green-light: #eef8ee;
  --judge-background: #fbfffb;
  --judge-border: #dcdcdc;
  --judge-text-muted: #6b6b6b;
  --judge-clean: #00C361;
  --judge-faulty: #FFB266;
  --judge-dis: #ff6161;
  --judge-fault: #1976d2;
  --judge-refusal: #e0a800;
  --judge-time: #26a69a;
}

body {
  background-color: var(--judge-background);
}

.judge-search,
.judge-detail {
  position: relative;
}

.judgeHidden {
  display: none !important;
}

/* hlavička */

.judgeHero {
  margin: 40px auto 40px auto;
  text-align: center;
  background-color: var(--judge-green);
  color: white;
  width: 90%;
  padding: 80px 0;
  border-radius: 20px;
  font-size: 70px;
  box-sizing: border-box;
}

.judgeHeroDetail {
  max-width: 1400px;
  padding: 50px 16px;
  font-size: inherit;
}

.judgeHeroDetail h1 {
  margin: 10px 0 0 0;
  font-size: 56px;
  line-height: 1.1;
}

.judgeHeroFlag {
  height: 40px;
  border-radius: 4px;
}

.judgeHeroSub {
  margin-top: 12px;
  font-size: 20px;
  opacity: 0.9;
}

.judgeContainer {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto 60px auto;
}

.judgeEmpty {
  padding: 30px;
  text-align: center;
  color: var(--judge-text-muted);
}

.judgeTopBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

/* přepínač roků */

.judgeYears {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.judgeYears a,
.judgeYears a:visited {
  padding: 5px 12px;
  border: 1px solid var(--judge-border);
  border-radius: 15px;
  background-color: white;
  color: black;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.judgeYears a:hover {
  border-color: var(--judge-green);
  background-color: var(--judge-green-light);
}

.judgeYears a.active {
  border-color: var(--judge-green);
  background-color: var(--judge-green);
  color: white;
  font-weight: bold;
}

/* vyhledávání */

.judgeSearchControls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.judgeSearchControls input,
.judgeSearchControls select {
  font: inherit;
  font-size: 18px;
  padding: 10px 14px;
  border: 1px solid var(--judge-border);
  border-radius: 5px;
  background-color: white;
}

.judgeSearchControls input {
  flex-grow: 1;
  min-width: 0;
}

.judgeSearchControls input:focus,
.judgeSearchControls select:focus {
  outline: 2px solid var(--judge-green);
  border-color: var(--judge-green);
}

.judgeSearchTable td:nth-child(2) a {
  font-weight: bold;
}

.judgeFlag {
  height: 18px;
  vertical-align: middle;
}

/* tabulky */

.judgeTableWrapper {
  overflow-x: auto;
}

.judgeTable {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border: 1px solid var(--judge-border);
  border-radius: 5px;
}

.judgeTable th,
.judgeTable td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.judgeTable th {
  background-color: var(--judge-green);
  color: white;
  font-weight: bold;
}

.judgeTable tbody tr:nth-child(even) {
  background-color: #f7fbf7;
}

.judgeTable tbody tr:hover {
  background-color: var(--judge-green-light);
}

.judgeTable a,
.judgeTable a:visited {
  color: black;
  text-decoration: none;
}

.judgeTable a:hover {
  color: var(--judge-green-dark);
  text-decoration: underline;
}

.judgeTable .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.judgeTableCompact {
  width: auto;
  min-width: 360px;
}

.judgeCompetitionsTable td:nth-child(2) {
  white-space: normal;
  min-width: 200px;
}

.judgeEntrantName {
  white-space: normal !important;
}

.judgeDate {
  color: var(--judge-text-muted);
}

.judgeBreed {
  color: var(--judge-text-muted);
  font-size: 0.85em;
  margin-left: 6px;
}

.judgeClean {
  color: #008a45;
}

.judgeFaulty {
  color: #c46a10;
}

.judgeDis {
  color: #d63838;
}

/* sekce */

.judgeSection {
  margin-top: 40px;
}

.judgeSection h2 {
  margin: 0 0 15px 0;
  font-size: 28px;
  color: var(--judge-green-dark);
}

.judgeSection h3 {
  margin: 30px 0 5px 0;
  font-size: 20px;
}

.judgeCount {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 12px;
  background-color: var(--judge-green);
  color: white;
  font-size: 16px;
  vertical-align: middle;
}

.judgeTwoColumns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr));
  gap: 0 30px;
}

/* bez min-width by široká tabulka roztáhla sloupec gridu místo scrollu ve wrapperu */
.judgeTwoColumns > * {
  min-width: 0;
}

.judgeShowMore {
  display: block;
  margin: 15px auto 0 auto;
  padding: 10px 24px;
  font: inherit;
  font-weight: bold;
  color: white;
  background-color: var(--judge-green);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.judgeShowMore:hover {
  background-color: var(--judge-green-dark);
}

/* dlaždice */

.judgeTiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.judgeTilesCompare {
  grid-template-columns: repeat(5, 1fr);
  margin-top: 12px;
}

@media only screen and (max-width: 1200px) {
  .judgeTiles,
  .judgeTilesCompare {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.judgeTile {
  padding: 16px 18px;
  background-color: white;
  border: 1px solid var(--judge-border);
  border-left: 5px solid var(--judge-green);
  border-radius: 5px;
}

.judgeTileLabel {
  color: var(--judge-text-muted);
  font-size: 14px;
}

.judgeTileValue {
  margin-top: 4px;
  font-size: 30px;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

.judgeTileValue span {
  font-size: 16px;
  font-weight: normal;
  color: var(--judge-text-muted);
}

.judgeTileAverage {
  margin-top: 4px;
  font-size: 13px;
  color: var(--judge-text-muted);
}

/* bar čistě / tb / dis */

.judgeBar {
  display: flex;
  height: 14px;
  min-width: 120px;
  border-radius: 3px;
  overflow: hidden;
  background-color: #eee;
}

.judgeBarClean {
  background-color: var(--judge-clean);
}

.judgeBarFaulty {
  background-color: var(--judge-faulty);
}

.judgeBarDis {
  background-color: var(--judge-dis);
}

.judgeBarCell {
  width: 30%;
}

.judgeCompare {
  padding: 16px 18px;
  background-color: white;
  border: 1px solid var(--judge-border);
  border-radius: 5px;
}

.judgeCompareRow {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
}

.judgeCompareRow .judgeBar {
  height: 24px;
}

.judgeCompareLabel {
  font-weight: bold;
}

.judgeCompareAverage .judgeCompareLabel {
  font-weight: normal;
  color: var(--judge-text-muted);
}

.judgeCompareNumbers {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-variant-numeric: tabular-nums;
}

/* tabulka dobíhavosti */

.judgeDot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
}

.judgeRowSelected,
.judgeTable tbody tr.judgeRowSelected:nth-child(even) {
  background-color: var(--judge-green-light);
  font-weight: bold;
}

.judgeCharts h3 {
  margin: 0 0 8px 0;
}

.judgeCharts {
  margin-bottom: 24px;
}

/* kolečka */

.judgeCards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.judgeCard {
  padding: 16px 18px;
  background-color: white;
  border: 1px solid var(--judge-border);
  border-radius: 5px;
}

.judgeCard h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
}

.judgeDonut {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto 10px auto;
}

.judgeDonut circle {
  transition: stroke-width 0.15s;
}

.judgeDonut circle:not(.judgeDonutTrack):hover {
  stroke-width: 28;
}

.judgeDonutTrack {
  stroke: #eee;
}

.judgeDonut .judgeBarClean { stroke: var(--judge-clean); }
.judgeDonut .judgeBarFaulty { stroke: var(--judge-faulty); }
.judgeDonut .judgeBarDis { stroke: var(--judge-dis); }
.judgeDonut .judgeFillFault { stroke: var(--judge-fault); }
.judgeDonut .judgeFillRefusal { stroke: var(--judge-refusal); }
.judgeDonut .judgeFillTime { stroke: var(--judge-time); }

.judgeFillFault { background-color: var(--judge-fault); }
.judgeFillRefusal { background-color: var(--judge-refusal); }
.judgeFillTime { background-color: var(--judge-time); }

.judgeDonutValue {
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 30px;
  font-weight: bold;
}

.judgeDonutLabel {
  text-anchor: middle;
  font-size: 14px;
  fill: var(--judge-text-muted);
}

.judgeDonutLegend {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.judgeDonutLegend th {
  font-weight: normal;
  color: var(--judge-text-muted);
  font-size: 12px;
}

.judgeDonutLegend th,
.judgeDonutLegend td {
  padding: 3px 4px;
  text-align: left;
  white-space: nowrap;
}

.judgeDonutLegend .num {
  text-align: right;
}

.judgeMuted {
  color: var(--judge-text-muted);
}

/* pořadí */

.judgeRanks {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 18px;
  height: calc(100% - 40px);
}

.judgeRankValue {
  font-size: 40px;
  font-weight: bold;
  color: var(--judge-green-dark);
  font-variant-numeric: tabular-nums;
}

.judgeRankValue span {
  font-size: 16px;
  font-weight: normal;
  color: var(--judge-text-muted);
}

.judgeRankLabel {
  color: var(--judge-text-muted);
}

/* zajímavosti */

.judgeRecords {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  gap: 12px;
}

.judgeRecordDetail {
  margin-top: 6px;
  font-weight: bold;
}

.judgeRecordSub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--judge-text-muted);
}

/* sezónnost */

.judgeSeason .judgeChart {
  width: 100%;
  box-sizing: border-box;
}

.judgeSeason .judgeChart-title {
  display: none;
}

@media only screen and (max-width: 1100px) {
  .judgeCards,
  .judgeRecords {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

/* poměr typů běhů - graf přes celou šířku */

.judgeRunShares .judgeChart {
  max-width: none;
  padding: 0;
}

/* mobil */

@media only screen and (max-width: 800px) {
  .judgeHero {
    width: auto;
    margin: 20px 16px;
    padding: 50px 0;
    font-size: 44px;
  }

  .judgeHeroDetail {
    padding: 30px 16px;
  }

  .judgeHeroDetail h1 {
    font-size: 34px;
  }

  .judgeContainer {
    width: auto;
    margin: 0 16px 40px 16px;
  }

  .judgeSearchControls {
    flex-direction: column;
  }

  .judgeTwoColumns {
    grid-template-columns: 1fr;
  }

  .judgeCompareRow {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .judgeTableCompact {
    width: 100%;
    min-width: 0;
  }

  .judgeTable th,
  .judgeTable td {
    padding: 6px 8px;
  }

  .hideMobile {
    display: none;
  }
}
