/* =========================================================
   contact-form.css
   Styling für die contact-form.php Komponente. Bewusst
   eigenständig (nicht Teil von hero.css) - so funktioniert das
   Formular auch auf Seiten OHNE den großen Hero-Header.
   Nutzt --accent/--hero-* Variablen falls vorhanden, hat aber
   für jede Farbe einen Fallback-Wert, falls die Seite diese
   Variablen gar nicht definiert.
   ========================================================= */

.contact {
  position: relative;
  padding: 5rem 0 5.5rem;
  background: #0a070f;
  color: #f4f1ea;
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.contact-head {
  text-align: center;
  margin-bottom: 2.2rem;
}

.contact-head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 .7rem;
}

.contact-head-script {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  color: var(--hero-red, #ef5b5b);
  display: inline-block;
  transform: rotate(-1.5deg);
}

.contact-head p {
  color: rgba(244, 241, 234, .68);
  line-height: 1.6;
  margin: 0;
}

.contact-form {
  background: rgba(244, 241, 234, .045);
  border: 1px solid rgba(244, 241, 234, .12);
  border-radius: 22px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.contact-field--full {
  grid-column: 1 / -1;
}

.contact-field label {
  font-size: .82rem;
  font-weight: 600;
  color: rgba(244, 241, 234, .8);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  background: rgba(244, 241, 234, .06);
  border: 1px solid rgba(244, 241, 234, .18);
  border-radius: 10px;
  padding: .75rem .9rem;
  font: inherit;
  font-size: .92rem;
  color: #f4f1ea;
  transition: border-color .2s ease, background-color .2s ease;
}

.contact-field select {
  /* Sagt dem Browser: bitte auch die native Dropdown-Liste dunkel
     rendern, nicht nur die geschlossene Box (in Chrome/Firefox/Edge
     wirkt das direkt auf die Popup-Liste selbst). */
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23f4f1ea'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .95rem center;
  background-size: 10px 6px;
  padding-right: 2.3rem;
}

.contact-field select option {
  background: #17121f;
  color: #f4f1ea;
}

.contact-field textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--accent, #d4af37);
  background: rgba(244, 241, 234, .09);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: rgba(244, 241, 234, .35);
}

/* Fallback-Button-Styling, falls die Seite (noch) kein eigenes .btn/.btn-primary hat */
.contact-submit.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.contact-submit.btn-primary {
  background: linear-gradient(135deg, var(--accent, #d4af37), color-mix(in srgb, var(--accent, #d4af37) 60%, var(--hero-magenta, #e0559c)));
  color: #1a1522;
}

.contact-submit {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: .4rem;
  border: none;
  cursor: pointer;
}

@media (max-width: 640px) {
  .contact { padding: 3.5rem 0 4rem; }
  .contact-form {
    grid-template-columns: 1fr;
    padding: 1.4rem;
  }
  .contact-submit { justify-self: stretch; text-align: center; }
}

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

.contact-status {
  border-radius: 12px;
  padding: .9rem 1.2rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
  text-align: center;
}

.contact-status--success {
  background: color-mix(in srgb, var(--hero-green, #4fb477) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-green, #4fb477) 45%, transparent);
  color: #e8f6ee;
}

.contact-status--warning {
  background: color-mix(in srgb, var(--hero-orange, #ef9d3c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-orange, #ef9d3c) 45%, transparent);
  color: #fbeedd;
}

.contact-status--error {
  background: color-mix(in srgb, var(--hero-red, #ef5b5b) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--hero-red, #ef5b5b) 45%, transparent);
  color: #fbe3e3;
}

/* ============================ MODAL-MODUS ============================ */

.contact-trigger {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 1.4rem 0 .4rem;
  padding: .85rem 1.7rem;
  border: none;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(212, 175, 55, .22);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.contact-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(212, 175, 55, .32);
  filter: brightness(1.06);
}

.contact-trigger:active {
  transform: translateY(0);
}

.contact-trigger::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H8l-5 4V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H8l-5 4V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.contact--modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
  background: none; /* Hintergrund kommt vom Backdrop, nicht von der Section selbst */
}

.contact--modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .25s ease;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 3, 8, .78);
  backdrop-filter: blur(3px);
}

.contact--modal .contact-inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #100c17;
  border: 1px solid rgba(244, 241, 234, .14);
  border-radius: 22px;
  padding: 2.2rem 1.8rem;
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease;
}

.contact--modal.is-open .contact-inner {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: rgba(244, 241, 234, .08);
  border: 1px solid rgba(244, 241, 234, .18);
  color: #f4f1ea;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  z-index: 2;
}

.contact-modal-close:hover {
  background: rgba(244, 241, 234, .16);
}

/* verhindert Hintergrund-Scroll waehrend das Modal offen ist */
body.contact-modal-locked {
  overflow: hidden;
}

@media (max-width: 640px) {
  .contact--modal .contact-inner {
    padding: 1.8rem 1.3rem;
    border-radius: 18px;
  }
}
