.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-family: system-ui, sans-serif;
  color: #1a1a1a;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  color: #1a1a1a;
}

.input-container {
  position: relative;
  margin-top: 20px;
}

.input {
  background-color: #ffffff;
  border-radius: 10px;
  border: 1px solid #ccc;
  box-sizing: border-box;
  color: #1a1a1a;
  font-size: 16px;
  height: 50px;
  outline: 0;
  padding: 0 16px;
  width: 100%;
}

.input:focus {
  border-color: #0057ff;
  background-color: #fff;
}

.placeholder {
  position: absolute;
  left: 16px;
  top: 14px;
  color: #888;
  font-size: 16px;
  pointer-events: none;
  transition: transform 200ms ease, color 200ms ease;
}

.input:focus ~ .placeholder,
.input:not(:placeholder-shown) ~ .placeholder,
textarea.input:not(:placeholder-shown) ~ .placeholder {
  transform: translateY(-26px) scale(0.85);
  color: #0057ff;
  background: white;
  padding: 0 4px;
}

.placeholder::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  height: 20px;
  background-color: white;
  width: 100%;
  transform: translateY(-50%) scaleX(1.3);
  z-index: -1;
  border-radius: 8px;
}

textarea.input {
  padding-top: 12px;
  min-height: 80px;
  resize: vertical;
}

.submit,
.modal-actions button {
  background-color: #f0f0f0;
  color: #1a1a1a;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  height: 44px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  margin-top: 1rem;
}

.modal-actions button:hover {
  background-color: #e0e0e0;
  border-color: #aaa;
}

.modal-actions button[style*="darkred"] {
  background-color: #f5f5f5 !important;
  color: #b00020;
  border: 1px solid #d0d0d0;
}

.modal-actions button[style*="darkred"]:hover {
  background-color: #f0f0f0 !important;
  border-color: #b00020;
}

.modal-overlay input,
.modal-overlay select,
.modal-overlay textarea,
.modal-overlay button {
  margin-bottom: 0 !important;
}

/* Schönere Darstellung für Info-Overlays (nur für "Details") */
.info-card {
  background: #f9fbff;
  border-left: 5px solid #0057ff;
  padding: 1.5rem 1rem;
}

.info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.info-icon {
  font-size: 2rem;
}

.info-title {
  font-size: 20px;
  font-weight: 600;
  color: #0057ff;
}

.info-item {
  margin: 12px 0;
  font-size: 15px;
  color: #333;
}

.info-item label {
  display: block;
  font-size: 13px;
  color: #777;
  margin-bottom: 4px;
}

.info-item a {
  color: #0057ff;
  text-decoration: none;
  word-break: break-word;
}

.info-item a:hover {
  text-decoration: underline;
}



/* Nur für reine Ansicht-Overlays */
.modal-overlay.view-overlay .modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-family: system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #1a1a1a;
}

.view-overlay .input-container {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.view-overlay .input-container label {
  font-weight: bold;
  font-size: 0.9em;
  color: #444;
}

.view-overlay .input-container div {
  padding: 8px 12px;
  background: #f6f6f6;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-family: monospace;
  white-space: pre-line;
}

.view-overlay a {
  color: #0057ff;
  text-decoration: none;
  word-break: break-word;
}

.view-overlay a:hover {
  text-decoration: underline;
}

.view-overlay .modal-actions button {
  margin-top: 1.5rem;
}
