/**
 * UNDERDOCK - Kontaktformular (contact.css)
 * 
 * Exakte Vorgaben:
 * - Gesamtbreite: max 950px, auf Fill gestellt (100% Breite responsiv)
 * - Headlines & Radio Optionen: Bold (700), 20px, 1.2em Line-Height
 * - Headlines um 10px links eingerückt
 * - Einzeilige Eingabefelder: Höhe 85px
 * - Nachricht Textarea: Höhe 300px
 * - Radio-Karten Reihenfolge: 1. Icon (70x70px) -> 2. Text -> 3. Radio Kreis (26x26px)
 * - Radio Kreis: 2px Outline unselektiert, 8px Outline selektiert
 * - Placeholder: 20px, 50% Opacity
 * - Default: Keine Outline
 * - Hover: Farbopacity um +10% verstärkt (30% -> 40%)
 * - Focus / Klick / Selected: 1px weiße Outline mit 20% Opacity
 */

.container--contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 80px; /* 80px Spacing zwischen Headline und Kontaktformular */
  width: 100%;
  max-width: 950px;
  margin: 0 auto;
  box-sizing: border-box;
}

.container--contact .section__headline {
  margin-bottom: 0; /* Verhindert doppelten Abstand, da gap: 80px greift */
}

.contact-form {
  width: 100%;
  max-width: 950px;
  display: flex;
  flex-direction: column;
  gap: 80px; /* 80px Spacing zwischen Kontaktformular-Feldern und Button */
  box-sizing: border-box;
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 50px; /* 50px Abstand zwischen den Feldern im Formular */
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================
   1. FORM LABELS (HEADLINES ÜBER FELDERN)
   Um 10px links eingerückt, Bold, 20px, 1.2em
   ========================================== */
.form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.form-label {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2em;
  color: var(--ud-white, #F8F7F5);
  text-align: left;
  padding-left: 10px;
  margin-bottom: 10px;
  user-select: none;
}

/* ==========================================
   2. BETREFF: RADIO-BUTTONS
   4 nebeneinander, 70x70 Icon -> Text -> 26x26 Kreis
   ========================================== */
.subject-radio-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 50px;
  width: 100%;
  box-sizing: border-box;
}

.radio-card {
  position: relative;
  display: block;
  height: 240px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  cursor: pointer;
  box-sizing: border-box;
  user-select: none;
  border: none;
  outline: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.radio-card:hover {
  background-color: rgba(255, 255, 255, 0.4); /* +10% Stärker auf Hover (von 30% auf 40%) */
}

/* Unsichtbarer echter Radio-Input für native Semantik & Tastaturnavigation */
.radio-card__input {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Inhalt der Radio-Karte: Icon -> Text -> Kreis */
.radio-card__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 30px 20px;
  box-sizing: border-box;
  text-align: center;
}

/* 1. Icon: Exakt 70x70px */
.radio-card__icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
  pointer-events: none;
}

/* 2. Text der Option: Bold, 20px, 1.2em */
.radio-card__title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2em;
  color: var(--ud-white, #F8F7F5);
  text-align: center;
  word-break: normal;
}

/* 3. Radio Kreis: Exakt 26x26px, 3px Outline unselektiert (80% Opacity), 8px Outline selektiert (100% Opacity) */
.radio-card__circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 3px solid rgba(248, 247, 245, 0.8);
  background: transparent;
  flex-shrink: 0;
  transition: border-width 0.2s ease, border-color 0.2s ease;
}

/* Selektierter Zustand der Radio-Karte: 2px Inner-Outline mit 100% Opacity */
.radio-card:has(.radio-card__input:checked),
.radio-card.is-selected {
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 2px var(--ud-white, #F8F7F5); /* 2px weiße Inner-Outline mit 100% Opacity */
}

.radio-card:has(.radio-card__input:checked) .radio-card__circle,
.radio-card.is-selected .radio-card__circle {
  border-width: 8px; /* Outline wird dicker zu 8px */
  border-color: var(--ud-white, #F8F7F5); /* 100% Opacity im ausgewählten Zustand */
}

/* Tastatur-Fokus Ring für Barrierefreiheit */
.radio-card:has(.radio-card__input:focus-visible) {
  outline: 2px solid var(--ud-white, #F8F7F5);
  outline-offset: 2px;
}

/* ==========================================
   3. E-MAIL & NAME ZEILE
   Nebeneinander mit 50px Gap, Höhe 85px
   ========================================== */
.form-row {
  display: flex;
  gap: 50px;
  width: 100%;
  box-sizing: border-box;
}

.form-group--half {
  flex: 1;
  min-width: 0;
}

/* ==========================================
   4. EINGABEFELDER (INPUTS & TEXTAREA)
   - Einzeilig: 85px Höhe
   - Textarea: 300px Höhe
   - Radius: 20px
   - Default: Keine Outline
   - Hover: +3% Opacity
   - Focus: 1px weiße Outline
   - Text & Placeholder: 20px, Bold (700), 1.2em
   ========================================== */
.form-input,
.form-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2em;
  color: var(--ud-white, #F8F7F5);
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  outline: none;
  border-radius: 20px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.form-input {
  height: 85px;
  padding: 0 30px;
}

.form-textarea {
  height: 300px;
  padding: 28px 30px;
  resize: none;
  display: block;
}

/* Placeholder: 20px, 50% Opacity UD-White */
.form-input::placeholder,
.form-textarea::placeholder {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2em;
  color: rgba(248, 247, 245, 0.5);
  opacity: 1; /* Notwendig für Firefox */
  transition: color 0.2s ease;
}

/* Hover-Zustand: +10% Farbopacity (von 30% auf 40%) und +10% Placeholder-Opacity (von 50% auf 60%) */
.form-input:hover,
.form-textarea:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.form-input:hover::placeholder,
.form-textarea:hover::placeholder {
  color: rgba(248, 247, 245, 0.6);
}

/* Klick / Focus: 2px weiße Inner-Outline mit 35% Opacity */
.form-input:focus,
.form-textarea:focus {
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* ==========================================
   5. BOT-SCHUTZ: HONEYPOT
   Unsichtbar für Menschen, fängt Bots ab
   ========================================== */
.form-honeypot {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================
   6. SUBMIT BUTTON & STATUS FEEDBACK
   ========================================== */
.form-submit {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;
}

.form-status {
  width: 100%;
  text-align: center;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 600;
  min-height: 24px;
  display: none;
  padding: 14px 20px;
  border-radius: 12px;
  box-sizing: border-box;
}

.form-status.is-success {
  display: block;
  background-color: rgba(255, 255, 255, 0.25);
  color: var(--ud-white, #F8F7F5);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.form-status.is-error {
  display: block;
  background-color: rgba(242, 132, 130, 0.3);
  color: var(--ud-white, #F8F7F5);
  border: 1px solid rgba(242, 132, 130, 0.6);
}

/* ==========================================
   7. RESPONSIVE ANPASSUNGEN
   Skaliert auf kleineren Screens sauber mit
   ========================================== */
@media (max-width: 980px) {
  .subject-radio-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .radio-card {
    height: 220px;
  }

  .form-row {
    gap: 30px;
  }

  .contact-form {
    gap: 60px;
  }

  .container--contact {
    gap: 60px;
  }

  .form-fields {
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .container--contact {
    gap: 50px;
  }

  .contact-form {
    gap: 50px;
  }

  .form-fields {
    gap: 30px;
  }

  .form-row {
    flex-direction: column;
    gap: 30px;
  }

  .subject-radio-group {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .radio-card {
    height: 190px;
    border-radius: 16px;
  }

  .radio-card__inner {
    padding: 20px 10px;
  }

  .radio-card__icon {
    width: 50px;
    height: 50px;
  }

  .radio-card__title {
    font-size: 16px;
  }

  .radio-card__circle {
    width: 22px;
    height: 22px;
  }

  .radio-card:has(.radio-card__input:checked) .radio-card__circle,
  .radio-card.is-selected .radio-card__circle {
    border-width: 6px;
  }

  .form-input {
    height: 70px;
    padding: 0 20px;
    font-size: 18px;
    border-radius: 16px;
  }

  .form-input::placeholder,
  .form-textarea::placeholder {
    font-size: 18px;
  }

  .form-textarea {
    height: 240px;
    padding: 20px;
    font-size: 18px;
    border-radius: 16px;
  }

  .form-label {
    font-size: 18px;
  }
}
