/* Sama kuin sovelluksen _RaceHistoryScreen (races_screen.dart). */
.history-page {
  width: 100%;
  max-width: 750px;
  margin: 0 auto;
  padding: 68px 10px 80px;
  box-sizing: border-box;
}

.history-page h1 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.history-page .subtitle {
  margin: 4px 0 14px;
  color: #666;
  font-size: 14px;
}

.race-card {
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(rgba(255, 255, 255, .965), rgba(255, 255, 255, .95) 50%);
  box-shadow:
    0 0 2px rgba(0, 56, 113, .04),
    0 0 20px rgba(0, 56, 113, .07),
    inset 0 0 0 .5px rgba(0, 56, 113, .08),
    inset 1px 1px 0 rgba(255, 255, 255, .9);
}

.race-row {
  display: grid;
  grid-template-columns: 19fr 13fr 35fr 8fr 13fr 12fr;
  align-items: center;
  height: 40px;
  color: rgba(0, 0, 0, .87);
  font-size: 12px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.race-row > .cell {
  min-width: 0;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.race-row > .center { text-align: center; }

.race-head {
  height: 34px;
  background: var(--navy);
}
.race-head button.cell {
  height: 100%;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
.race-head button.cell:hover { background: rgba(255, 255, 255, .08); }

.race-row.striped { background: rgba(30, 90, 200, .05); }
a.race-row { cursor: pointer; transition: background-color .15s; }
a.race-row:hover { background-color: rgba(0, 56, 113, .06); }
a.race-row:active { background-color: rgba(0, 56, 113, .12); }

.place-cell {
  display: flex;
  align-items: center;
}
.place-cell .place {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CountryFlag(size: 20) */
.flag-icon, .flag-fallback {
  flex: none;
  width: 20px;
  height: 15px;
  margin: 3px;
  box-sizing: border-box;
  border: 1px solid #858585;
  border-radius: 2px;
  object-fit: cover;
}
.flag-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
}

.race-message {
  padding: 26px 24px;
  text-align: center;
}
.race-message h2 {
  margin: 12px 0 6px;
  color: var(--navy);
  font-size: 17px;
}
.race-message p {
  margin: 0;
  color: #607D8B;
  font-size: 13px;
}
.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid rgba(0, 56, 113, .15);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
