/* style_ueberblick.css - App-spezifische Styles für Überblick */

/* --- Buttons (leichtes, modernes Aussehen) --- */
.btn {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f3f4f6;
  color: #111827;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover {
  filter: brightness(0.98);
}
.btn.primary {
  background: linear-gradient(180deg, #2563eb, #1e40af);
  color: #fff;
  border-color: rgba(0, 0, 0, 0.08);
}

/* --- Modal / Popup --- */
.termin-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}
.termin-modal[aria-hidden="true"] {
  display: none;
}
.termin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}
.termin-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 1rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.35);
  padding: 1rem 1.25rem;
  z-index: 2;
}

.termin-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}
.termin-form legend {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.termin-form label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #374151;
}
.termin-form input[type="text"],
.termin-form input[type="datetime-local"],
.termin-form select,
.termin-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  margin-top: 0.25rem;
  background: #fff;
  font-size: 0.95rem;
}

.termin-dates {
  display: flex;
  gap: 0.75rem;
}
.termin-dates > div {
  flex: 1;
}

.termin-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 0.9rem;
}

/* smaller select to show multiple options nicely */
.termin-form select[multiple] {
  min-height: 110px;
}

.termin-type {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.suggestions {
  position: relative;
  margin-top: 4px;
}
.suggestions .suggestion-list {
  position: absolute;
  z-index: 1200;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.12);
  max-height: 220px;
  overflow: auto;
  width: 100%;
}
.suggestions .suggestion-item {
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.95rem;
}
.suggestions .suggestion-item:hover {
  background: #f3f4f6;
}
.suggestions .suggestion-item.active {
  background: #eef2ff;
  outline: 1px solid rgba(99, 102, 241, 0.12);
}

/* Responsive tweaks */
@media (max-width: 560px) {
  .termin-modal-dialog {
    padding: 0.75rem;
  }
  .termin-dates {
    flex-direction: column;
  }
}

/* small helper for action area above table */
.ueberblick-actions {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

/* Progress panel styles */
.ueberblick-progress {
  display: block;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid #e6edf3;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  margin-bottom: 12px;
}
.ueberblick-progress .progress-step {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 4px;
  border-radius: 6px;
}
.ueberblick-progress .progress-step + .progress-step {
  margin-top: 6px;
}
.ueberblick-progress .step-icon {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
  background: #cbd5e1; /* neutral */
}
.ueberblick-progress .progress-step.running .step-icon {
  background: #f59e0b; /* amber */
  animation: pulse 1.6s infinite;
}
.ueberblick-progress .progress-step.done .step-icon {
  background: #10b981; /* green */
}
.ueberblick-progress .progress-step.error .step-icon {
  background: #ef4444; /* red */
}

/* Animated ring loader for running state */
.ueberblick-progress .progress-step .step-icon {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
}
.ueberblick-progress .progress-step .step-icon::before,
.ueberblick-progress .progress-step .step-icon::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.ueberblick-progress .progress-step .step-icon::before {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(99, 102, 241, 0.12);
  box-sizing: border-box;
  opacity: 0.9;
}
.ueberblick-progress .progress-step .step-icon::after {
  width: 26px;
  height: 26px;
  border: 3px solid transparent;
  border-top-color: rgba(99, 102, 241, 0.18);
  opacity: 0.85;
}
.ueberblick-progress .progress-step.running .step-icon::after {
  animation: spin 1.2s linear infinite;
}
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
.ueberblick-progress .step-body .step-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
}
.ueberblick-progress .step-body .step-detail {
  font-size: 0.85rem;
  color: #475569;
}
@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Calendar cell tweaks: allow multiple lines/titles stacked */
.calendar-day {
  /* keep calendar cells a fixed height and prevent row expansion */
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
  padding: 4px 6px !important;
  height: 26px !important;
  max-height: 26px !important;
  line-height: 18px !important;
}
.calendar-day div {
  display: inline;
  margin: 0;
  padding: 0;
}

/* End of ueberblick styles */
