@charset "UTF-8";
/**
 * Contact Form 7 – Anpassung an das Ciseco-/OrangeCAD-Designsystem.
 *
 * Nutzt konsequent die shadcn-CSS-Variablen des Themes (siehe style.css /
 * theme.json) statt harter Hex-Werte, damit das Formular optisch identisch
 * zu Suche, Kommentaren und WooCommerce-Inputs ist.
 *
 * Alles auf `.wpcf7` gescoped – kein Einfluss auf andere Formulare.
 */

/* ---------------------------------------------------------------- *
 * Layout-Grid (Teil B – wird nur wirksam, wenn das CF7-Markup die
 * Wrapper .cf7-grid / .cf7-col verwendet; ohne sie bleibt es einspaltig)
 * ---------------------------------------------------------------- */
.wpcf7 .cf7-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.wpcf7 .cf7-col {
  min-width: 0;
}

@media (max-width: 640px) {
  .wpcf7 .cf7-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- *
 * Grundgerüst
 * ---------------------------------------------------------------- */
.wpcf7,
.wpcf7 .wpcf7-form-control {
  font-family: var(--wp--preset--font-family--body, "Nunito", sans-serif);
}

.wpcf7 .wpcf7-form p {
  margin-bottom: 1rem;
}

/* Labels */
.wpcf7 label {
  display: block;
  font-weight: 500;
  color: var(--wp--preset--color--shadcn-primary-foreground, #111111);
  margin-bottom: 0.375rem;
}

/* ---------------------------------------------------------------- *
 * Text-Inputs / Select / Textarea
 * ---------------------------------------------------------------- */
.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 select,
.wpcf7 textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid var(--wp--preset--color--shadcn-input, #e6dfdf);
  border-radius: 99px;
  background-color: var(--wp--preset--color--shadcn-background, #ffffff);
  color: var(--wp--preset--color--shadcn-foreground, #111111);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Textarea abweichend: größerer, weicher Radius statt Pille */
.wpcf7 textarea {
  border-radius: 12px;
  min-height: 8rem;
  resize: vertical;
}

/* Select-Pfeil analog Theme (assets/css/form.css) */
.wpcf7 select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.9rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
}

/* Platzhalter */
.wpcf7 ::placeholder {
  color: var(--wp--preset--color--gray-600, #b3a1a1);
  opacity: 1;
}

/* Fokus – Orange-Ring über --shadcn-ring */
.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none;
  border-color: var(--wp--preset--color--shadcn-ring, #ff591a);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--wp--preset--color--shadcn-ring, #ff591a) 25%, transparent);
}

/* Disabled analog form.css */
.wpcf7 input:disabled,
.wpcf7 select:disabled,
.wpcf7 textarea:disabled {
  background-color: #f7fafc;
  border-color: #edf2f7;
  color: #a0aec0;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- *
 * Submit-Button – Pille im Markenstil
 * ---------------------------------------------------------------- */
.wpcf7 .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 99px;
  background-color: var(--wp--preset--color--shadcn-primary, #ff591a);
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.wpcf7 .wpcf7-submit:hover {
  background-color: color-mix(in oklab, var(--wp--preset--color--shadcn-primary, #ff591a) 88%, #000);
}

.wpcf7 .wpcf7-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--wp--preset--color--shadcn-ring, #ff591a) 35%, transparent);
}

.wpcf7 .wpcf7-submit:active {
  transform: translateY(1px);
}

/* Spinner beim Absenden */
.wpcf7 .wpcf7-spinner {
  margin-left: 0.75rem;
}

/* ---------------------------------------------------------------- *
 * Validierung & Statusmeldungen an die Palette angleichen
 * ---------------------------------------------------------------- */
.wpcf7 .wpcf7-not-valid {
  border-color: #dc2626 !important;
}

.wpcf7 .wpcf7-not-valid:focus {
  box-shadow: 0 0 0 3px color-mix(in oklab, #dc2626 25%, transparent);
}

.wpcf7 .wpcf7-not-valid-tip {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #dc2626;
}

.wpcf7 .wpcf7-response-output {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--wp--preset--color--shadcn-border, #e6dfdf);
  font-size: 0.9375rem;
}

/* Erfolgsmeldung – dezent orange/grün-neutral im Markenton */
.wpcf7 form.sent .wpcf7-response-output {
  border-color: color-mix(in oklab, var(--wp--preset--color--shadcn-primary, #ff591a) 45%, transparent);
  background-color: color-mix(in oklab, var(--wp--preset--color--shadcn-primary, #ff591a) 8%, transparent);
}

/* Fehler-/Ungültig-Meldung */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output {
  border-color: color-mix(in oklab, #dc2626 45%, transparent);
  background-color: color-mix(in oklab, #dc2626 8%, transparent);
}
