/* =========================================================
   Fonts
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,300;1,700&family=Work+Sans:ital,wght@0,400;0,700;1,700&display=swap');


/* =========================================================
   Global / Basis
   ========================================================= */
* { box-sizing: border-box; }

.hidden { display: none; }

body {
  background: #fff url("/media/allgemein/feintlogo.png") no-repeat top right;
  background-size: 200px auto; /* effektiv: letzte Angabe gewinnt */
  color: #303030;
  font-family: 'Nunito', 'Arial', sans-serif;
  font-size: 100%;
}

@media (min-width: 768px)  { body { background-size: 300px auto; } }
@media (min-width: 1200px) { body { background-size: 400px auto; } }

h1, h2, h3, h4, h5, h6 { font-family: 'Work Sans', sans-serif; }

.center-text { text-align: center; }

.textbox:after,
.pagearea:after {
  content: "";
  display: table;
  clear: both;
}


/* =========================================================
   Header / Logo
   ========================================================= */
.site-header {
  padding-left: 8px;
  padding-top: 8px;
}

.header-logo {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Desktop-Logo-Größen: 240 / 300 (deine “alte” Variante) */
@media (min-width: 768px)  { .header-logo { max-width: 240px; } }
@media (min-width: 1200px) { .header-logo { max-width: 300px; } }

/* Mobile-Spezial: deine bestehende Variante */
@media (max-width: 600px) {
  .header-logo {
    max-width: 140px;
    width: 60%;
    margin: 12px 0 0 12px;
  }
}


/* =========================================================
   Layout / Container
   ========================================================= */
.pagearea,
.pagearea.pagearea-home {
  max-width: 960px;
  width: 95%;
  margin: 20px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: auto;
}

.pagearea.pagearea-home { max-width: 700px; }

.textbox {
  padding: 10px 20px;
  border: 1px solid #AAA;
  background: rgba(216, 216, 216, 0.3);
  overflow-x: auto;
  word-wrap: break-word;
  width: 100%;
  max-width: 100%;
}

.narrowbox {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

/* Mobile-Container */
@media (max-width: 600px) {
  .textbox,
  .narrowbox,
  .pagearea,
  .pagearea-home {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }
}


/* =========================================================
   Footer
   ========================================================= */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  padding: 8px;
  background: #9DA900;
  line-height: 25px;
  font-size: 85%;
  z-index: 1000;
  text-align: center;
}

.footer a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  margin: 0 10px;
}

.footer a:hover {
  color: #ffff00;
  text-decoration: underline;
}


/* =========================================================
   Form Controls (Allgemein)
   ========================================================= */
input,
textarea,
select {
  font-size: 16px;
  color: #000;
  font-family: Arial, sans-serif;
}

input[type=button],
input[type=submit],
input[type=reset] {
  border: 1px solid #aaa;
  background: rgb(4, 107, 179);
  color: #fff;
  font-weight: bold;
  padding: 4px;
}

input[type=text],
input[type=password] {
  border: 1px solid #aaa;
  padding: 4px 8px;
  margin: 4px;
  max-width: 100%;
}

input[type=text]:focus {
  background-color: lightblue;
  outline: 1px solid #000;
}

/* Standard Button-Klasse */
.button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
.button:hover { background-color: #0056b3; }

/* Mobile Buttons */
@media (max-width: 600px) {
  input[type="submit"],
  .button {
    width: 100%;
    font-size: 18px;
  }
}


/* =========================================================
   Typografie / Kleinkram
   ========================================================= */
td {
  padding: 4px 8px;
  border: 0;
}

.aussenabstand { text-indent: 30px; }

p {
  margin-block-start: 10px;
  margin-block-end: 10px;
}


/* =========================================================
   Einstufungstest – Aufgaben / Struktur
   ========================================================= */
.aufgabe-title {
  font-weight: bold;
  font-size: 1.1em;
  color: #222;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.aufgabe-instruktion {
  font-weight: bold;
  font-style: italic;
  color: #333;
  margin-bottom: 1em;
  display: block;
}

/* kompaktere Label-Zeilen */
p > label {
  display: inline-block;
  margin: 2px 0;
  line-height: 1.4;
}

/* Nur <br> in p mit Radio-Buttons unterdrücken */
p:has(input[type="radio"]) > br { display: none; }

.answer-indent { padding-left: 60px; margin: 0; }

/* Question-Block: Radio-Optionen untereinander */
.question-block { margin-left: 20px; }
.question-block label { display: block; margin-top: 3px; }


/* =========================================================
   Einstufungstest – Inputs / Textarea / Radio
   ========================================================= */
textarea {
  color: #3333FF;
  font-size: 18px;
  border: 3px solid #ccc;
  padding: 5px;
  background: #e8eaec;
  width: 100%;
  box-sizing: border-box;
}

input[type="radio"] {
  accent-color: black;
  margin-right: 6px;
}

input[type="radio"].beispiel-radio { accent-color: green; }

@media (max-width: 600px) {
  input[type="radio"] {
    transform: scale(1.2);
    margin-right: 8px;
  }

  form label {
    display: block;
    line-height: 1.5;
    word-break: break-word;
  }
}


/* =========================================================
   Einstufungstest – Beispiele (Beispiel-Sätze/Antworten)
   ========================================================= */
.beispiel {
  color: purple;
  font-style: italic;
}

/* Beispiel-Inputs nicht klickbar */
.beispiel input,
.beispiel select {
  pointer-events: none;
}
.beispiel input:focus,
.beispiel select:focus {
  outline: none;
}

/* Beispiel-Antworten */
.beispiel-richtig input,
.beispiel-richtig select,
.beispiel-richtig {
  font-weight: 600;
  opacity: 1;
}

.beispiel-falsch input,
.beispiel-falsch select,
.beispiel-falsch {
  color: #666;
  opacity: 0.5;
  pointer-events: none;
}

/* Beispiel-Aufgaben kompakt darstellen */
label .beispiel-radio { margin-right: 6px; }

p:has(.beispiel-radio) {
  margin-bottom: 4px;
  line-height: 1.3;
}

p:has(.beispiel-radio) > br { display: none; }

p:has(.beispiel-radio) em:has(.beispiel-radio) {
  display: block;
  margin: 2px 0;
  padding-left: 60px;
  line-height: 1.3;
}

p:has(.beispiel-radio) em:has(.beispiel-radio) label { display: block; }

p:has(input[type="radio"]) label {
  display: block;
  margin: 2px 0;
  line-height: 1.4;
}


/* =========================================================
   Einstufungstest – Schüttelkasten
   ========================================================= */
.schuettelkasten {
  display: inline-block;
  border: 1px solid #ccc;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 15px;
}
.schuettelkasten span {
  display: inline-block;
  margin: 5px;
  padding: 5px 10px;
  background-color: #e0e0ff;
  border-radius: 5px;
  white-space: nowrap;
}


/* =========================================================
   Einstufungstest – Bild/Text Komponenten
   ========================================================= */
.text-with-image-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid #ccc;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.text-image {
  width: 150px;
  height: auto;
  flex-shrink: 0;
}
.text-content {
  flex: 1;
  min-width: 200px;
  width: 100%;
}

/* Mobile: Box untereinander + Bild zentrieren */
@media (max-width: 600px) {
  .text-with-image-box { flex-direction: column; }
  .text-image { margin: 0 auto; }
}


/* =========================================================
   Bilder / Responsive
   ========================================================= */
.responsive-img,
.responsive-img2,
.responsive-img3,
.responsive-img4 {
  width: 100%;
  height: auto;
  display: block;
}

.responsive-img  { max-width: 500px; margin: 0 auto; }
.responsive-img2 { max-width: 250px; }
.responsive-img3 { max-width: 300px; }
.responsive-img4 { max-width: 150px; }

/* Grid für Bilder */
.img-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.img-wrapper {
  width: 100%;
  text-align: center;
}
.responsive2-img {
  width: 100%;
  max-width: 150px;
  height: auto;
}

@media (max-width: 600px) { .img-container { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px) { .img-container { grid-template-columns: 1fr; } }


/* =========================================================
   Aufgabenlayout + Tabelle (rechts)
   ========================================================= */
.aufgaben-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}

.aufgaben { min-width: 0; }
.artikel-tabelle-wrapper { min-width: 0; }

.artikel-tabelle {
  border-collapse: collapse;
  width: 100%;
  color: purple;
  font-style: italic;
}
.artikel-tabelle td {
  border: 1px solid #aaa;
  padding: 6px 12px;
  color: purple;
  font-style: italic;
}

@media (max-width: 768px) {
  .aufgaben-layout { grid-template-columns: 1fr; }
  .artikel-tabelle-wrapper { order: -1; }
}


/* =========================================================
   Navigation / Steps / Modal (Einstufungstest)
   ========================================================= */
.step-nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  background: transparent;
  border: none;
  display: flex;
  justify-content: flex-end;
  padding: 8px 0;
}

.step-nav [data-action="next"],
.nav-top [data-action="prev"] {
  margin: 4px 0 4px 8px;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
}
.modal.hidden { display: none; }

.modal-content {
  background: #fff;
  padding: 20px 24px;
  border-radius: 8px;
  border: 2px solid #444;
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  max-width: 500px;
  width: 90%;
  text-align: center;
}
.modal-content button { margin: 8px; }


/* =========================================================
   Inline Task Row (Text + kleines Bild)
   ========================================================= */
.task-row {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.task-row .task-text { flex: 0 1 auto; }

.task-row .img-wrapper {
  flex: 0 0 auto;
  width: auto;        /* überschreibt global .img-wrapper { width:100% } */
  text-align: left;
  margin-top: -3px;
}

.task-row .responsive2-img {
  width: auto;        /* überschreibt global */
  max-width: 90px;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .task-row .responsive2-img { max-width: 70px; }
}


/* =========================================================
   Hinweis-Icon + Tabelle
   ========================================================= */
.tabelle-mit-icon{
  display:flex;
  align-items:flex-start;
  gap: 10px;
}

.hint-icon{
  width: 36px;
  height: auto;
  flex: 0 0 auto;
  opacity: 0.95;
}

@media (max-width: 700px){
  .tabelle-mit-icon{
    flex-direction: column;
    align-items: flex-start;
  }
  .hint-icon{
    width: 16px;
    height: auto;
  }
  .hint-label{ font-size: 0.95rem; }
}

.tabelle-hinweis{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.hint-label{
  font-weight: 600;
  line-height: 1.2;
}


/* =========================================================
   Ergebnisse / Layout (zweispaltig)
   ========================================================= */
.result-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.result-grid .leftcol,
.result-grid .rightcol {
  flex: 1 1 48%;
}
@media (max-width: 768px) {
  .result-grid .leftcol,
  .result-grid .rightcol {
    flex-basis: 100%;
  }
}


/* =========================================================
   Mobile Dropdown / Mailtext (kleine Helfer)
   ========================================================= */
.mailtext { line-height: 1.6; }

.gap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px;
  white-space: nowrap;
}

.gap select {
  font-size: 16px;
  padding: 6px 10px;
  border-radius: 10px;
  max-width: 170px;
}

@media (max-width: 480px) {
  .gap {
    display: inline-flex;
    flex-wrap: wrap;
    white-space: normal;
  }
  .gap select { max-width: 100%; }
}


/* =========================================================
   Checkbox / Example-Line (Responsive)
   ========================================================= */
.confirmation-translation {
  display: block;
  margin-left: 24px;
}
@media (max-width: 600px) {
  .confirmation-translation { margin-left: 8px; }
}

.example-line {
  display: inline-block;
  margin-top: 6px;
  margin-left: 65px;
}
@media (max-width: 600px) {
  .example-line {
    display: block;
    margin-left: 0;
  }
}


/* =========================================================
   Mündlicher Test / Ergebnis-Grid
   ========================================================= */
.score-grid {
  display: grid;
  grid-template-columns: auto 110px auto;
  gap: 8px 12px;
  align-items: center;
  max-width: 560px;
}

.score-grid input[type="number"],
.score-grid input[type="text"] {
  width: 90px;
  padding: 4px 6px;
  text-align: center;
}

.save-status { font-size: .85em; opacity: .8; }
.save-status.ok { color: #2e7d32; }
.save-status.err { color: #c62828; }

.col-head { font-weight: 600; margin-bottom: 2px; }

.hinweisbox {
  background: #fffcea;
  border: 1px solid #f0e1a0;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 720px;
  line-height: 1.35;
}
.hinweisbox b { display: inline-block; margin-bottom: 4px; }
.hinweisbox ul { margin: 6px 0 0 18px; }

/* Einstufung (mündlich) + Kürzel rechts untereinander */
.muendlichbox,
.kuerzelbox {
  max-width: 120px;
  float: right;
  text-align: right;
}

.muendlichbox { margin-top: 12px; margin-bottom: 4px; }
.kuerzelbox   { clear: right; margin-top: 6px; margin-bottom: 12px; }

.muendlichbox input {
  width: 60px;
  text-align: center;
}

.kuerzelbox input {
  width: 45px;
  text-align: center;
}


/* =========================================================
   Schreiben / Word Counter (ChatGPT)
   ========================================================= */
.word-counter {
  font-size: 0.9em;
  color: #555;
  margin-top: 4px;
  font-style: italic;
  text-align: right;
}


/* =========================================================
   Testergebnisse Tabelle (Backend/Listen)
   ========================================================= */
table.testergebnis {
  border-collapse: collapse;
  width: 100%;
  font-family: sans-serif;
}

table.testergebnis caption h2 { font-size: 20px; }

table.testergebnis th,
table.testergebnis td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: left;
}

table.testergebnis tr:nth-child(even) { background-color: #f9f9f9; }

table.testergebnis .trenner {
  background-color: #eee;
  height: 10px;
  border: none;
}

table.testergebnis button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}
table.testergebnis button:hover { color: red; }

table.testergebnis tr.erster-test { background-color: #c8e6c9; }
table.testergebnis tr.zweiter-versuch { background-color: #e0e0e0; }


/* =========================================================
   Aufgabe 26 – Tabellen-Inputs (iOS- & Desktop-sicher)
   ========================================================= */

.aufgabe26-tabelle {
  border-collapse: collapse;
  margin-top: 1em;
  font-family: sans-serif;
}

.aufgabe26-tabelle td,
.aufgabe26-tabelle th {
  padding: 5px 10px;
  border: 1px solid #ccc;
  text-align: center;
  white-space: nowrap;
}

/* Basis: alle Textinputs in Aufgabe 26 */
.aufgabe26-tabelle input[type="text"] {
  font-size: 16px;              /* verhindert iOS Zoom */
  padding: 0.45em 0.55em;
  box-sizing: border-box;
  width: auto;
}

/* Artikel-Felder (der / die / das) */
.aufgabe26-tabelle input[maxlength="3"] {
  min-width: 4.5ch;
  text-align: center;
}

/* Nomen-Felder (Bein, Arm, etc.) */
.aufgabe26-tabelle input[maxlength="4"] {
  min-width: 6ch;
}

/* Beispiel-Felder */
.aufgabe26-tabelle input[readonly] {
  background-color: #f5f5f5;
}

.ios-safari .aufgabe26-tabelle input {
  border-radius: 4px;
}


/* =========================================================
   Legacy / Spezial (iOS Safari) – nur relevant, wenn JS die
   Klasse "ios-safari" setzt. Wenn archiviert: kann raus.
   ========================================================= */
.ios-safari input.beispiel-chip {
  width: auto !important;
  min-width: inherit;
}
.ios-safari input.ch-1  { min-width: calc(1ch + 1.2em) !important; }
.ios-safari input.ch-2  { min-width: calc(2ch + 1.2em) !important; }
.ios-safari input.ch-3  { min-width: calc(3ch + 1.2em) !important; }
.ios-safari input.ch-4  { min-width: calc(4ch + 1.2em) !important; }
.ios-safari input.ch-5  { min-width: calc(5ch + 1.2em) !important; }
.ios-safari input.ch-6  { min-width: calc(6ch + 1.2em) !important; }
.ios-safari input.ch-7  { min-width: calc(7ch + 1.2em) !important; }
.ios-safari input.ch-8  { min-width: calc(8ch + 1.2em) !important; }
.ios-safari input.ch-9  { min-width: calc(9ch + 1.2em) !important; }
.ios-safari input.ch-10 { min-width: calc(10ch + 1.2em) !important; }
.ios-safari input.ch-11 { min-width: calc(11ch + 1.2em) !important; }
.ios-safari input.ch-12 { min-width: calc(12ch + 1.2em) !important; }
.ios-safari input.ch-13 { min-width: calc(13ch + 1.2em) !important; }
.ios-safari input.ch-14 { min-width: calc(14ch + 1.2em) !important; }


