/* ==========================================================================
   MOBILE FIRST (STANDARD-STYLES FÜR HANDY)
   ========================================================================== */

header {

  /* Quellenangabe 7 Start */
  
  background-image: url('../media/background-form.jpg');

  /* Quellenangabe 7 Ende */

  background-size: cover;
  background-position: center;
  min-height: 60vh; /* Verhindert das Abschneiden auf Handys */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Quellenangabe 1 Start */

input, textarea {
  box-sizing: border-box;
}

/* Quellenangabe 1 Ende */

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  background-color: #2d2d2c;
  color: #2d2d2c;
}

h1 {
  text-align: center;
  color: #5a2024;
  font-weight: 500;
  margin-top: 0;
}

h2 {
  color: #2d2d2c;
  font-weight: 400;
}

p {
  color: #2d2d2c;
}

a {
  color: #5a2024;
  font-weight: 700;
}

/* Welcome-Container & Main teilen sich Basis-Styles auf Mobile */
.welcome-container, main {
  background: rgba(229, 228, 228, 0.9); /* Bessere Lesbarkeit mobil */
  padding: 20px;
  border-radius: 12px;
  width: 100%;
  max-width: 90%;
  margin: 20px auto;
  box-sizing: border-box;
}

form {
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

fieldset {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 15px;
  background: #ffffff;
  margin-bottom: 20px;
  min-width: 0;
}

legend {
  color: #5a2024;
  padding: 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

input, select, textarea {
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  padding: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
}

/* Breite für Feld Zeit, Termin und Geburtstag auf Mobile */
input[type="time"],
input[type="date"] {
  width: auto;            
  min-width: 160px;       
  max-width: 200px;       
  display: inline-block;  
}

label {
  margin-bottom: 6px;
  font-size: 14px;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-item, .checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.radio-item input, .checkbox-group input {
  width: auto;
}

button,
.style-button {
  display: inline-block; 
  box-sizing: border-box;
  text-decoration: none; /* Entfernt den Unterstrich beim Link */
  text-align: center;
  cursor: pointer;
  margin-top: 20px;
  background-color: #5a2024;
  border: none;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #e5e4e3;
}

.center {
  text-align: center;
}

/* ==========================================================================
   Erfolgreiches Absenden des Formulars
   ========================================================================== */

.confirmation-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  max-width: 600px;
  margin: 10px auto;
}

.alert-success {
  justify-items: center; /* Zentriert alle Elemente im Grid horizontal */
  display: grid;
  grid-template-columns: 1fr; /* Eine einzige Spalte von oben nach unten */
  background-color: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin-bottom: 25px;
  font-weight: bold;
}

.hero-logo {
  margin: 0 auto 10px auto;
  width: 200px;    
}

.summary-table {
  width: 100%;
  border-collapse: collapse; /* Doppelränder zwischen Tabellenfeldern vermeiden*/
  margin-top: 15px;
}

.summary-table tr {
  border-bottom: 1px solid #e5e4e3;
}

.summary-table td {
  padding: 10px 0;
}


/* ==========================================================================
   VALIDIERUNG
   ========================================================================== */

.form-group.has-error > label { /* Wählt alle 'label'-Elemente innerhalb von '.form-group.has-error' aus */
  color: red !important;
  font-weight: bold;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  color: red;
  background-color: #fff0f0 !important;
}

.checkbox-group.has-error-checkbox label {
  color: red !important;
  font-weight: bold;
}

.checkbox-group.has-error-checkbox input[type="checkbox"] {

  accent-color: red;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
  color: #e5e4e3;
  padding: 20px;
}

footer p {
  color: #e5e4e3;
  margin: 5px 0;
}

footer a {
  color: #e5e4e3;
  font-weight: 700;
  text-decoration: underline;
}

/* Mobile-First: Links stehen untereinander */
.footer-links {
  display: flex;
  flex-direction: column; /* Stapelt die Links vertikal */
  align-items: center;
  gap: 10px;         
  margin-top: 10px;
}

/* ==========================================================================
   RESPONSIVE DESIGN (DESKTOP AB 768px)
   ========================================================================== */

@media (min-width: 768px) {
  header {
    height: 100vh;
    padding: 0;
  }

  .welcome-container, main {
    padding: 30px 40px;
    max-width: 800px;
    margin: 40px auto;
  }
  
  .welcome-container {
    background: rgba(229, 228, 228, 0.75);
  }

  main {
    background: #e5e4e3;
    text-align: center;
  }

  form {
    text-align: left;
  }

  .radio-group {
    flex-direction: row;
  }

  .footer-links {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
}