@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700&display=swap');

/* Grundlayout */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Mulish', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #666;
  margin: 8px;
  max-width: 500px;
  padding: 0 12px;
}

/* Allgemeine Eingabefelder */
.forminput,
input[type='text'],
textarea,
select {
  display: block;         /* sorgt dafür, dass Breite wirkt */
  width: 100%;            /* passt sich der verfügbaren Breite an */
  max-width: 500px;       /* 👉 maximale Breite, z. B. 400 px */
  box-sizing: border-box; /* Padding zählt zur Gesamtbreite */
  border-radius: 3px;
  border: 1px solid #ccc;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;       /* 👉 angenehm große Klickfläche */
  /*margin-bottom: 14px;     /* 👉 Abstand nach unten */
  min-height: 36px;        /* 👉 optisch gleichmäßige Höhe */
}

.textCell {
  display: block;           /* volle Zeilenbreite */
  font-weight: bold;
  font-size: 1.1em;         /* etwas größer als Standardtext */
  color: #333;
  margin-top: 16px;         /* Abstand nach oben */
  margin-bottom: 8px;       /* Abstand vor dem nächsten Feld */
}

.textCell:first-of-type {
 /* margin-top: 0;            /* erste Überschrift ohne Extra-Abstand */
}

textarea {
  height: 90px;
  resize: vertical;
}

/* Einheitliches Styling für Dropdowns */
select.forminput {
  width: 100%;
  border-radius: 3px;
  border: 1px solid #ccc;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;     /* sorgt für angenehme Klickfläche */
/*  margin-bottom: 14px;  */
  height: 38px;          /* 👉 explizite Höhe, besser als min-height */
  background-color: #fff;
  appearance: none;      /* entfernt native Pfeil-Stile in vielen Browsern */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath fill='%23666' d='M8 10L0 0h16z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

/* Für Safari und iOS: */
select.forminput:focus {
  outline: none;
  border-color: #d83381;
}

/* Checkboxen */
input[type='checkbox'] {
  min-height: auto; 
  height: 20px;
  width: 20px;
  margin: 0px;
}

/* Labels */
.formlabel {
  display: block;
  margin-bottom: 6px; /* Abstand zwischen Label und Feld */
  margin-top: 14px;
}

.formlabelerror {
  color: #d83381;
}

/* Fehlerzustände */
.forminputerror {
  /* background-color: #ffff99; */
}

/* Buttons */
input[type='submit'] {
  display: block !important;   /* Block-Level Button */
  margin: 10px auto 0 auto;   /* Oben Abstand, horizontal zentriert */
  background-color: #d83381;
  color: #fff;
  border-radius: 3px;
  border: none;
  padding: 10px 20px;
  font-size: 15px;
  width: auto;
  max-width: 300px;
  cursor: pointer;
}

input[type='submit']:hover {
  background-color: #c22972;
}

/* Buttonbereich */
.formbutton {
  float: none !important;          /* Float aufheben */
  display: flex !important;        /* Flexbox aktivieren */
  justify-content: center;
  margin-top: 16px;
}

/* Meldungen */
.validationmsg {
  font-weight: bold;
  /*background-color: #d83381;*/
  color: #d83381;
  text-align: center;
  padding: 8px;
  margin-bottom: 10px;
}

.infomsg {
  font-size: 1.1em;
  font-weight: bold;
  background-color: #93d1d5;
  text-align: center;
  padding: 8px;
  margin-bottom: 10px;
}

div.errordiv {
  display: none;
  width: 100%;
  color: #ff0000;
  margin: 6px 0;
}

div.validationError {
  display: block;
  color: #ff0000;
  display: none !important; /* wird komplett versteckt */
}

/* Responsiv */
@media (max-width: 600px) {
  body {
    font-size: 15px;
  }

  .formlabel {
    width: 100%;
  }

  .forminput {
    width: 100%;
  }

  .formbutton {
    justify-content: center;
  }

  input[type='submit'] {
    width: 100%;
  }
}


/* Greife nur auf die table-row, die das Input-Feld mit dieser ID enthält */
.table-row:has(input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Reihenfolge umdrehen: Checkbox links, Label rechts */
.table-row:has(input[type='checkbox']) > div:first-child {
  order: 2; /* Label nach hinten */
}

.table-row:has(input[type='checkbox']) > div:last-child {
  order: 1; /* Checkbox zuerst */
  display: flex;
  align-items: center;
}

/* Checkbox-Größe */
.table-row:has(input[type='checkbox']) input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin-top: 7px;
  vertical-align: top; /* zusätzliche Sicherheit */
}
