/* ============================================================
   CTLS COMPONENT: MODAL FORM
   ------------------------------------------------------------
   Globale Modal-Box für Formulare (TerminAnfrageModal, Buchung, etc.)
   ============================================================ */

/* === Overlay === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1em;
  background-color: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* === Modal-Box === */
.modal-box {
  background: #f2f5f7;
  padding: 2em;
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: fadeInUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  text-align: left; /* Formularinhalte linksbündig */
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === Titel & Close-Button === */
.modal-box h2 {
  margin-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1em;
  text-align: center;
  color: var(--color-primary);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #444;
  line-height: 1;
}

/* === Formularfelder === */
.modal-box form input:not([type="checkbox"]),
.modal-box form select,
.modal-box form textarea {
  width: 100%;
  padding: 0.9em;
  font-size: 1rem;
  margin-bottom: 1.2em;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-box form input:focus,
.modal-box form select:focus,
.modal-box form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0,119,204,0.15);
  outline: none;
}

/* === Select Dropdown === */
.modal-box form select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.5em center;
  background-size: 2em;
  padding-right: 3em;
}

/* === Textarea === */
.modal-box form textarea {
  resize: vertical;
  min-height: 100px;
}

/* === Checkboxen === */
.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5em;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 0.6em;
  transform: scale(1.1);
  cursor: pointer;
}

/* === Submit-Button === */
.modal-box form button[type="submit"],
#terminAnfrageForm button[type="submit"] {
  display: block;
  width: 100%;
  max-width: 400px;
  margin: 2em auto 0;
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  padding: 1em;
  transition: background 0.2s ease;
}

.modal-box form button[type="submit"]:hover {
  background: #005fa3;
}

/* === Erfolgsmeldung === */
#formularErfolg {
  display: none;
  margin-top: 1em;
  color: green;
  font-weight: bold;
  text-align: center;
}

/* === Responsive === */
@media (max-width: 500px) {
  .modal-box {
    padding: 1.2em;
    max-height: 85vh;
  }
  .modal-box h2 {
    font-size: 1.3rem;
  }
}

/* === Utility: Zentrierter Slide-Inhalt === */
#slide-3 .slide-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* === Spezialanpassungen === */
.modal-box .modal-form {
  background: transparent;
  padding: 0;
  border-radius: 0;
}

.terminwahl label {
  display: block;
  margin-top: 0.5em;
}

.terminwahl input {
  width: 100%;
  margin-bottom: 1em;
}