/* CSS Document */

/* Body beim offenen Modal nicht scrollbar machen */
body.no-scroll {
  overflow: hidden;
}

.zugang-form__message {
  margin-top: 1rem;
  font-size: 0.9rem;
  min-height: 1.2em; /* damit die Box nicht springt */
 white-space: pre-line;
}

.zugang-form__message--success {
  color: #155724;
}

.zugang-form__message--error {
  color: #721c24;
}

/* Grund-Container des Modals (unsichtbar, bis Klasse .is-visible gesetzt wird) */
.zugang-modal {
  position: fixed;
  inset: 0; /* top, right, bottom, left: 0; */
  display: none;
  z-index: 9999; /* vor deinem Seiten-Container */
}

/* sichtbar schalten */
.zugang-modal.is-visible {
  display: block;
}

/* halbtransparentes Overlay */
.zugang-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

/* eigentlicher Dialog */
.zugang-modal__dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 480px;       /* maximale Breite */
  width: 90vw;            /* auf kleinen Screens fast volle Breite */
  max-height: 90vh;       /* nicht höher als der Viewport */
  overflow-y: auto;       /* bei sehr kleinen Displays scrollbar */
  background: #ffffff;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Titel */
.zugang-modal__title {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  font-weight: 600;
}

/* Schließen-Button (X) */
.zugang-modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

/* Formular-Layout */
.zugang-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.zugang-form__group {
  display: flex;
  flex-direction: column;
}

.zugang-form__group label {
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}

.zugang-form__group input {
  padding: 0.45rem 0.55rem;
  font-size: 0.95rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.zugang-form__group input:focus {
  outline: none;
  border-color: #0077c8; /* dezente Akzentfarbe */
  box-shadow: 0 0 0 2px rgba(0, 119, 200, 0.15);
}

.zugang-form__hint {
  margin: 0.5rem 0 0.8rem;
  font-size: 0.8rem;
  color: #555555;
}

/* Absende-Button */
.zugang-form__submit {
  align-self: flex-start;
  padding: 0.5rem 1.1rem;
  font-size: 0.95rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  background: #0077c8;
  color: #ffffff;
  font-weight: 500;
  transition: background 0.15s ease, transform 0.05s ease;
}

.zugang-form__submit:hover {
  background: #005e9c;
}

.zugang-form__submit:active {
  transform: translateY(1px);
}

/* etwas Abstand auf ganz kleinen Screens erzwingen */
@media (max-width: 480px) {
  .zugang-modal__dialog {
    padding: 1.2rem 1.1rem;
  }
}
