/* Component-level styles for the "Prüfstempel" identity. */

/* --- list-row: icon + title/subtitle + chevron (dashboard, Auswertung entry points) --- */
.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: var(--paper-card);
  text-decoration: none;
  color: inherit;
}
.card > .list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--paper); }
.list-row .row-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pen-blue);
  font-size: 22px;
}
.list-row .row-text { flex: 1; min-width: 0; }
.list-row .row-text h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.list-row .row-text p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.list-row .row-chevron { flex: none; color: var(--brass); font-size: 16px; }

.row-divider-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 12px 14px 4px;
}

/* --- stat-row: a stamped result paired with a plain typed note beside it ---
   "green" is always the passed/learned reading, so it gets the actual
   rubber-stamp treatment; "plain" stays flat type, like a note in the margin. */
.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 14px;
}
.stat-row .stat-row-label {
  flex-basis: 100%;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
}
.stat-box { text-align: center; }

.stat-box.green {
  flex: none;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid var(--stamp-green);
  box-shadow: 0 0 0 3px var(--paper-card), 0 0 0 4px var(--stamp-green);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-5deg);
  color: var(--stamp-green);
}
.stat-box.green .stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--stamp-green); }
.stat-box.green .stat-label { font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--stamp-green); margin-top: 1px; line-height: 1.3; }

.stat-box.plain {
  flex: 1;
  text-align: left;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.stat-box.plain .stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 500; color: var(--ink); }
.stat-box.plain .stat-label { font-size: 12px; margin-top: 2px; color: var(--muted); }
.stat-box .stat-label b { font-weight: 700; }

/* --- fixed bottom icon-toolbar (quiz screen) — a tab strip, not a floating bar --- */
.bottom-toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--ink);
  display: flex;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-toolbar .toolbar-inner {
  display: flex;
  width: 100%;
  max-width: var(--content-max-width);
}
.bottom-toolbar button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  border-top: 3px solid transparent;
  color: #B7AF9C;
  padding: 7px 2px 6px;
  cursor: pointer;
  font-family: var(--font-body);
}
.bottom-toolbar button:disabled { opacity: .4; cursor: default; }
.bottom-toolbar button ion-icon { font-size: 17px; }
.bottom-toolbar button span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .03em;
  white-space: nowrap;
}
.bottom-toolbar button.active { border-top-color: var(--brass); color: var(--paper-card); }

body.has-bottom-toolbar .app-main { padding-bottom: 64px; }

/* --- modal / confirm dialog --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32,36,42,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.modal-box {
  background: var(--paper-card);
  border: 1px solid var(--ink);
  border-radius: 0;
  max-width: 320px;
  width: 100%;
}
.modal-box h3 {
  margin: 0;
  padding: 20px 20px 10px;
  font-size: 17px;
}
.modal-box .modal-body {
  padding: 0 20px 16px;
  max-height: 45vh;
  overflow-y: auto;
  font-size: 14px;
  color: var(--ink);
}
.modal-box .modal-body p { margin: 0 0 10px; }
.modal-box .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 6px 10px 10px;
  border-top: 1px solid var(--line);
}

/* --- segmented control (Glossar TITEL/TEXT) --- */
.segment {
  display: flex;
  border: 1px solid var(--pen-blue);
  border-radius: 0;
  overflow: hidden;
}
.segment button {
  flex: 1;
  background: var(--paper-card);
  border: none;
  color: var(--pen-blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 8px 6px;
  cursor: pointer;
  border-right: 1px solid var(--pen-blue);
}
.segment button:last-child { border-right: none; }
.segment button.active { background: var(--pen-blue); color: var(--paper-card); }

/* --- range slider --- */
.range-field { padding: 10px 14px 14px; }
.range-field .range-label { font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.range-field .range-row { display: flex; align-items: center; gap: 10px; }
.range-field input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
}
.range-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--pen-blue);
  cursor: pointer;
}
.range-field input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: var(--pen-blue);
  cursor: pointer;
}
.range-field .range-value { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; min-width: 64px; text-align: right; }

/* --- checkbox / radio rows (settings forms, answer options) --- */
.option-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.card > .option-row:last-child { border-bottom: none; }
.option-row input[type="checkbox"], .option-row input[type="radio"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--pen-blue);
  flex: none;
}
.option-row .option-text { font-size: 14px; color: var(--ink); }
.option-row .option-text .option-title { display: block; font-weight: 600; }
.option-row .option-text .option-subtitle { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.section-label {
  padding: 12px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brass);
}

/* --- quiz question card --- */
.question-card .question-intro {
  padding: 14px 14px 0;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin: 0 0 2px;
}
.question-card .question-intro-label {
  display: block;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 4px;
}
.question-card .question-text {
  padding: 16px 14px;
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.question-card .question-instruction {
  padding: 0 14px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--brass);
}
.question-card .answers-intro {
  padding: 0 14px 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
}
.answer-row.correct { background: rgba(60,97,82,.12); box-shadow: inset 3px 0 0 var(--stamp-green); }
.answer-row.incorrect { background: rgba(156,58,46,.1); box-shadow: inset 3px 0 0 var(--stamp-red); }

/* --- glossary term list --- */
.glossary-list { padding: 4px 14px 14px; }
.glossary-term { padding: 12px 0; border-bottom: 1px solid var(--line); }
.glossary-term:last-child { border-bottom: none; }
.glossary-term h2 { margin: 0 0 4px; font-size: 15px; }
.glossary-term p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.45; }
