/**
 * Interactive Links Theme – Contact Form 7 Styling
 *
 * Minimalistisches Unterstrich-Design für Formulare des Plugins
 * "Contact Form 7": keine Kästen/Rahmen um die Eingabefelder, nur eine
 * dünne Linie darunter, die sich beim Fokussieren farblich hervorhebt.
 * Nutzt automatisch die Theme-Farben/-Schriftarten (CSS-Variablen aus
 * style.css), passt sich also an Hell-/Dunkelmodus und die im Customizer
 * gewählte Schriftart an. Wird nur eingebunden, wenn das Plugin Contact
 * Form 7 aktiv ist (siehe functions.php).
 */

.wpcf7 {
  font-family: var(--font-body);
  color: var(--color-text);
  max-width: 640px;
}

.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.wpcf7 p {
  margin: 0;
}

/* ==========================================================================
   Eingabefelder: Text, E-Mail, Telefon, Zahl, URL, Textarea, Select
   ========================================================================== */

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.wpcf7 textarea {
  min-height: 130px;
  resize: vertical;
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: var(--color-text-muted);
  opacity: 1;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-bottom-color: var(--color-text);
  background-color: rgba(var(--color-bg-rgb), 0.03);
}

/* Sanfter Hover-Hinweis, auch ohne Fokus, dass das Feld interaktiv ist. */
.wpcf7 input:hover,
.wpcf7 textarea:hover,
.wpcf7 select:hover {
  border-bottom-color: var(--color-text-muted);
}

/* Select-Felder: eigener, dezenter Pfeil statt des Browser-Standards. */
.wpcf7 select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23999' d='M3 5l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 14px;
  padding-right: 24px;
}

/* ==========================================================================
   Labels
   ========================================================================== */

.wpcf7 label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Checkbox / Radio
   ========================================================================== */

.wpcf7 .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 0 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: 15px;
  color: var(--color-text);
}

.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-text);
  cursor: pointer;
}

/* ==========================================================================
   Datenschutz-Zustimmung (häufig als eigener Absatz)
   ========================================================================== */

.wpcf7 .wpcf7-acceptance {
  font-size: 13px;
  color: var(--color-text-muted);
}

.wpcf7 .wpcf7-acceptance .wpcf7-list-item-label {
  margin-left: 4px;
}

/* ==========================================================================
   Absende-Button – leicht abgerundet, passend zu Hamburger/Mode-Switch
   ========================================================================== */

.wpcf7 input[type="submit"] {
  align-self: flex-start;
  margin-top: 8px;
  padding: 14px 36px;
  border: none;
  border-radius: 8px;
  background-color: var(--color-text);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.wpcf7 input[type="submit"]:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.wpcf7 input[type="submit"]:active {
  transform: translateY(0);
  opacity: 1;
}

.wpcf7 input[type="submit"]:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Lade-Spinner während des Sendevorgangs
   ========================================================================== */

.wpcf7 .wpcf7-spinner {
  margin-left: 12px;
  opacity: 0.7;
}

/* ==========================================================================
   Validierungsfehler (pro Feld) und Versand-Feedback
   ========================================================================== */

.wpcf7-not-valid-tip {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: none;
  color: #ff4d4d;
}

.wpcf7 input.wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid {
  border-bottom-color: #ff4d4d;
}

.wpcf7 .wpcf7-response-output {
  margin: 20px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text);
}

.wpcf7-mail-sent-ok {
  border-color: #2ecc71 !important;
  color: #2ecc71 !important;
}

.wpcf7-mail-sent-ng,
.wpcf7-validation-errors,
.wpcf7-aborted,
.wpcf7-spam-blocked,
.wpcf7-acceptance-missing {
  border-color: #ff4d4d !important;
  color: #ff4d4d !important;
}

/* Screenreader-Status (visuell ausblenden, bleibt für Assistenztechnologie erhalten). */
.wpcf7-form-control-wrap .screen-reader-response {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  overflow: hidden;
  height: 1px;
  width: 1px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  .wpcf7 form {
    gap: 22px;
  }

  .wpcf7 input[type="submit"] {
    width: 100%;
    align-self: stretch;
    text-align: center;
  }
}
