/* style.css */

body {
    position: relative;
    color: #333;
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f0f0f0; /* Fallback-Farbe */
    min-height: 100vh;
}

/* Unscharfer Hintergrund über ein Pseudo-Element */
body::before {
    content: "";
    position: fixed;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1; /* Legt das Bild hinter den Inhalt */

    background-image: url('../images/schild.jpg');
    background-repeat: no-repeat;
    background-position: left top;
    background-size: cover;
    filter: blur(4px) brightness(0.8);

    /* Wichtig: Verhindert, dass das Element Maus-Klicks abfängt */
    pointer-events: none;

    /* Sorgt für geschmeidige Übergänge bei der Bewegung */
    transform: translate(var(--move-x, 0px), var(--move-y, 0px)) scale(1.1);
    transition: transform 0.1s ease-out;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.title {
  margin-left: 20px;
  font-size: 3rem;
}

/* --- MODAL & BACKDROP STYLING --- */

/* Dunkler Hintergrund-Overlay */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9998;
}

/* Modal Dialog */
.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 420px;
  z-index: 9999;
  overflow: hidden;
}

/* Modal Kopfbereich */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #1e293b;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.modal-close:hover {
  color: #0f172a;
}

/* Modal Formularbereich */
.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-control:focus {
  border-color: #2c3e50;
  outline: none;
}

/* Modal Fußbereich / Buttons */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

/* --- BUTTON STYLES --- */

.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Haupt-Buttons (z. B. Dienstplan drucken, Anmelden) */
.btn-primary {
  background-color: #2c3e50;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1a252f;
}

.btn-primary:disabled {
  background-color: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.7;
}

/* Sekundäre Buttons (z.B. Abbrechen) */
.btn-secondary {
  background-color: #64748b;
  color: #ffffff;
}

.btn-secondary:hover {
  background-color: #475569;
}

/* Unaufdringliche Buttons / Outlines */
.btn-outline {
  background-color: #2c3e50;
  color: #ffffff;
  border-color: #cbd5e1;
  margin-right: 20px;
}

.btn-outline:hover {
  background-color: #1a252f;
  border-color: #94a3b8;
}

/* --- TABS & RESTLICHE ELEMENTE --- */

.tabs {
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  gap: 0;
  border-bottom: 2px solid #ddd;
  margin-bottom: 1rem;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.tab-btn {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 0.6rem 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn.active {
  border-bottom-color: #4a90d9;
  font-weight: bold;
}

.tab-content {
    background-color: rgba(255, 255, 255, 0.8);
    display: none !important;
    padding: 20px;
    padding-bottom: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.tab-content.active {
  display: block !important;
}

#tab-wegedienst.tab-content.active {
  background-color: rgba(255, 255, 255, 0.8);
  display: flex !important;
  flex-direction: column;
  box-sizing: border-box;
}

#tab-info {
  font-size: 1.5vw;
}

#tab-wegedienst .schedule-controls {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

#tab-wegedienst #calendar {
  background-color: rgba(255, 255, 255, 0.4);
  flex: 1;
  min-height: 0; */
  margin-bottom: 0.5rem;
}

#tab-wegedienst .legend {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
}

.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
}