/* ================================================================
   css/history.css  —  Stijlen voor de Geschiedenis-pagina
   ================================================================ */

/* ── Kleur token voor history-accent ────────────────────────── */
:root {
  --kleur-history: #3b9eff;
  --kleur-history-dim: rgba(59, 158, 255, 0.15);
}

/* ── Body staat in history-modus ─────────────────────────────── */
.history-pagina #kaartContainer {
  /* standaard verborgen; wordt getoond na bevestigen */
}

/* ================================================================
   SELECTIESCHERM
================================================================ */

.selectie-scherm {
  position: fixed;
  top: 50px; /* onder de bovenbalk */
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.97);
  z-index: 4000;
  padding: 20px;
  overflow-y: auto;
}

/* Centrale kaart */
.selectie-kaart {
  background: rgb(30, 30, 30);
  border-radius: 16px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Header */
.selectie-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 4px;
}

.selectie-header-icon {
  width: 48px;
  height: 48px;
  background: var(--kleur-history-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.selectie-titel {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.selectie-subtitel {
  margin: 0;
  font-size: 13px;
  color: var(--kleur-subtekst);
}

/* Groepen */
.selectie-groep {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.selectie-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--kleur-subtekst);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selectie-stap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--kleur-history-dim);
  color: var(--kleur-history);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.selectie-label-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
  font-size: 12px;
}

/* ── Radar grid ─────────────────────────────────────────────── */
.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.radar-optie {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: rgb(42, 42, 42);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.radar-optie:hover {
  background: rgb(50, 50, 50);
  border-color: rgba(59, 158, 255, 0.4);
}

.radar-optie.geselecteerd {
  border-color: var(--kleur-history);
  background: var(--kleur-history-dim);
}

.radar-optie__code {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.radar-optie__naam {
  font-size: 11px;
  color: var(--kleur-subtekst);
}

.radar-optie__status {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #555;
  margin-top: 4px;
}

.radar-optie__status.online  { background: #4caf50; }
.radar-optie__status.offline { background: #f44336; }

/* ── Datum input ─────────────────────────────────────────────── */
.selectie-input {
  padding: 10px 14px;
  background: rgb(42, 42, 42);
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  color-scheme: dark;
}

.selectie-input:focus {
  outline: none;
  border-color: var(--kleur-history);
}

/* ── Tijdselectors ───────────────────────────────────────────── */
.tijd-rij {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tijd-blok {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tijd-blok-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--kleur-subtekst);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tijd-selectors {
  display: flex;
  align-items: center;
  gap: 4px;
}

.selectie-select {
  flex: 1;
  padding: 9px 8px;
  background: rgb(42, 42, 42);
  border: 2px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  color-scheme: dark;
}

.selectie-select:focus {
  outline: none;
  border-color: var(--kleur-history);
}

.tijd-dubbele-punt {
  font-size: 18px;
  font-weight: 700;
  color: var(--kleur-subtekst);
  padding: 0 2px;
}

.tijd-pijl {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 22px; /* uitlijnen met selectors */
  flex-shrink: 0;
}

/* Feedback */
.tijd-feedback {
  font-size: 12px;
  color: #f44336;
  min-height: 16px;
  margin-top: -4px;
}

.tijd-feedback.ok {
  color: #4caf50;
}

/* Snelle knoppen */
.snelle-knoppen {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.snelle-knoppen-label {
  font-size: 12px;
  color: var(--kleur-subtekst);
}

.snelle-knop {
  padding: 5px 12px;
  background: rgb(50, 50, 50);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--kleur-subtekst);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.snelle-knop:hover {
  background: var(--kleur-history-dim);
  border-color: var(--kleur-history);
  color: var(--kleur-history);
}

/* ── Overzicht ───────────────────────────────────────────────── */
.selectie-overzicht {
  background: rgb(24, 24, 24);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.overzicht-rij {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.overzicht-label {
  color: var(--kleur-subtekst);
}

.overzicht-waarde {
  color: #fff;
  font-weight: 600;
}

/* ── Bevestigknop ────────────────────────────────────────────── */
.selectie-bevestig {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: var(--kleur-history);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.selectie-bevestig:hover:not(:disabled) {
  opacity: 0.88;
  transform: translateY(-1px);
}

.selectie-bevestig:active:not(:disabled) {
  transform: translateY(0);
}

.selectie-bevestig:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ================================================================
   KAARTSCHERM
================================================================ */

.kaart-scherm {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
}

.kaart-scherm.verborgen {
  display: none;
}

/* History badge (bovenin de kaart) */
.history-badge {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(20,20,20,0.88);
  border: 1px solid var(--kleur-history);
  color: var(--kleur-history);
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  z-index: 5500;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.history-badge-terug {
  background: none;
  border: none;
  color: var(--kleur-history);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.history-badge-terug:hover {
  opacity: 1;
}

/* Tijdlabel in de ui-bar */
.history-tijdlabel {
  font-size: 13px;
  font-weight: 700;
  color: var(--kleur-history);
  white-space: nowrap;
  min-width: 70px;
  text-align: center;
}

.ui-bar__rechts {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Laad-voortgangsbalk */
.history-laad-balk {
  position: relative;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}

.history-laad-voortgang {
  height: 100%;
  background: var(--kleur-history);
  border-radius: 999px;
  transition: width 0.3s ease;
  width: 0%;
}

.history-laad-tekst {
  position: absolute;
  right: 0;
  top: 6px;
  font-size: 11px;
  color: var(--kleur-subtekst);
  white-space: nowrap;
}


/* Op history pagina staat de badge bovenaan, chip iets lager */
.history-pagina .kaart-chip {
  top: 52px;
}
/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width: 600px) {
  .selectie-kaart {
    padding: 20px 16px;
  }

  .radar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tijd-rij {
    flex-direction: column;
    gap: 8px;
  }

  .tijd-pijl {
    transform: rotate(90deg);
    padding-top: 0;
  }
}