/* © 2026 Huberlabs · huberlabs CMS. Alle Rechte vorbehalten. Lizenz: LICENSE.txt */
/* huberlabs_system — Contact-Form Styles
 * Lädt nur wenn $contact_form_enabled = true (SMTP konfiguriert).
 * Nutzt die Site-Palette via CSS-Variablen — fügt sich daher in jedes Template ein. */

.contact-form-wrap {
  max-width: 640px;
  margin: 3rem auto 0;
  text-align: left;
  position: relative;
  /* Frosted-Glass-Karte — Hintergrund-Bild scheint dezent durch, Form bleibt aber als klar
     abgegrenzte Karte erkennbar. */
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  border: 1px solid rgba(244, 239, 232, 0.12);
  border-radius: 4px;
  padding: 2.4rem 2rem 2rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
/* Fallback für Browser ohne backdrop-filter: leicht dunkler statt blur */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .contact-form-wrap { background: rgba(20, 18, 16, 0.85); }
}
@media (max-width: 600px) {
  .contact-form-wrap { padding: 1.6rem 1.2rem; }
}

.contact-form-divider {
  text-align: center;
  margin: 0 0 1.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(244, 239, 232, 0.85);
  position: relative;
}
.contact-form-divider::before,
.contact-form-divider::after {
  content: '';
  display: inline-block;
  width: 32px; height: 1px;
  background: rgba(184, 153, 104, 0.5);
  vertical-align: middle;
  margin: 0 0.9rem;
}

.contact-form {
  display: flex; flex-direction: column;
  gap: 0.9rem;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}
@media (max-width: 600px) {
  .contact-form .form-row { grid-template-columns: 1fr; gap: 0.9rem; }
}

.contact-form label {
  display: flex; flex-direction: column;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 239, 232, 0.72);
  font-weight: 500;
  font-family: 'Inter', system-ui, sans-serif;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(244, 239, 232, 0.04);
  border: 1px solid rgba(244, 239, 232, 0.22);
  border-radius: 2px;
  color: var(--paper, #faf6f0);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: normal;
  text-transform: none;
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold, #b89968);
  background: rgba(244, 239, 232, 0.08);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(244, 239, 232, 0.35);
}
.contact-form textarea {
  resize: vertical; min-height: 140px;
  line-height: 1.5;
}

.contact-form-honeypot {
  position: absolute; left: -9999px; top: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
}

.contact-form-actions {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.contact-form button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 2.2rem;
  border: 1px solid var(--gold, #b89968);
  background: var(--gold, #b89968);
  color: var(--ink, #2a2622);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  border-radius: 2px;
}
.contact-form button[type="submit"]:hover:not(:disabled) {
  background: transparent;
  color: var(--gold, #b89968);
}
.contact-form button[type="submit"]:disabled {
  opacity: 0.5; cursor: wait;
}

.contact-form-status {
  font-size: 0.82rem;
  font-weight: 300;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.contact-form-status.visible { opacity: 1; }
.contact-form-status.ok      { color: #8ab87a; }
.contact-form-status.error   { color: #d97732; }

/* Erfolgs-Block (ersetzt das Formular nach erfolgreichem Submit) */
.contact-form-success {
  padding: 2rem 1.5rem;
  background: rgba(184, 153, 104, 0.08);
  border: 1px solid rgba(184, 153, 104, 0.3);
  border-radius: 2px;
  text-align: center;
}
.contact-form-success h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--gold, #b89968);
  margin-bottom: 0.6rem;
}
.contact-form-success p {
  font-size: 0.95rem;
  color: rgba(244, 239, 232, 0.78);
  line-height: 1.6;
}

/* Für helle Templates (z.B. wo .contact-form-wrap auf hellem Bg landet) wird
   das Theming durch CSS-Variablen automatisch korrekt — keine Anpassung nötig.
   Falls eine spezifische Sektion ein helles Form-Layout braucht, einfach
   im Template-CSS überschreiben. */

/* === Google reCAPTCHA v3 Badge ausblenden ===
   Google erlaubt das Verstecken des Badges, SOFERN ein Hinweis-Text mit Links
   zur Datenschutz- und Nutzungsbedingungen sichtbar ist. Den Text rendern wir
   im Template direkt unter dem Submit-Button (Klasse .recaptcha-notice).
   Siehe https://developers.google.com/recaptcha/docs/faq#id-like-to-hide-the-recaptcha-badge */
.grecaptcha-badge {
  visibility: hidden !important;
}

.recaptcha-notice {
  margin-top: 0.8rem;
  font-size: 0.7rem;
  line-height: 1.45;
  color: rgba(244, 239, 232, 0.5);
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 300;
}
.recaptcha-notice a {
  color: rgba(244, 239, 232, 0.7);
  text-decoration: underline;
  text-decoration-color: rgba(244, 239, 232, 0.25);
  text-underline-offset: 2px;
}
.recaptcha-notice a:hover {
  color: var(--gold, #b89968);
  text-decoration-color: var(--gold, #b89968);
}
