/* style.css – Modernisierte Version (mobile-first) */

/* Dynamische Farben einbinden */
@import url('../get_colors.php');

/* Zentrale Definition der Farben als Variablen (Fallback-Werte) */
:root {
  --color-blue: #3498db;
  --color-fuchsia: #ff00ff;
  --color-lightgray: #f9f9f9;
  --color-orange: #ff9800;
  --color-green: #2ecc71;
  --color-feier: #ffcc80;
  --color-event-bg: #f1f1f1;
  --color-event-border: #e0e0e0;
  --color-carina: #ff00ff;
  --color-jan: #3498db;
  --color-pascal: #00ced1;
  --color-paula: #800080;
  --color-overnight: #800080; /* Lila Farbe für Übernachtungen */
  --font-base: 'Arial', sans-serif;
}

/* Die restlichen Farben (--color-carina, --color-jan, etc.) 
   werden nun aus der get_colors.php dynamisch geladen */

/* Globales Reset und Box-Sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Basis-Stile */
body {
  font-family: var(--font-base);
  background-color: #fff;
  color: #333;
  line-height: 1.6;
}

/* Kopfbereich (Legende) */
header.legend {
  background-color: #f9f9f9;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Styling für user-info in der Legende */
header.legend .user-info {
  display: flex;
  align-items: center;
  margin-left: auto;
  margin-right: 10px;
}

header.legend .user-info span {
  margin-right: 10px;
}

header.legend .logout-link {
  color: #333;
  text-decoration: none;
  padding: 5px 10px;
  background-color: #eee;
  border-radius: 3px;
}

header.legend .logout-link:hover {
  background-color: #ddd;
}

header.legend h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

/* Legende für Einträge */
div.legend {
  background-color: #f5f5f5;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  position: static;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 15px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  margin: 0.5rem;
}

.color-box {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  border-radius: 3px;
}

/* Farben */
.blue { background-color: var(--color-blue); }
.fuchsia { background-color: var(--color-fuchsia); }
.green { background-color: var(--color-green); }
.feier { background-color: var(--color-feier); }

/* Kalender-Container */
.calendar-container {
  max-width: 900px;
  margin: 5rem auto 1rem;
  padding: 1rem;
}

/* Monatliche Kalender-Blöcke */
.month {
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 0.5rem;
  margin-bottom: 1.5rem;
}

.month h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

/* Kopfzeile und Woche als Grid (erste Spalte für KW) */
.header, .week {
  display: grid;
  grid-template-columns: 50px repeat(7, 1fr);
}

.week-number-header, .week-number {
  padding: 0.5rem;
  text-align: right;
  background-color: #ddd;
  border: 1px solid #eee;
  font-weight: bold;
}

/* Tageszellen */
.day-header, .day {
  padding: 0.5rem;
  text-align: center;
  border: 1px solid #eee;
  position: relative;
}

/* Tag-Zellen haben eine Mindesthöhe */
.day {
  min-height: 130px;
}

.day-header {
  background-color: #ddd;
}

.day.weekend {
  background-color: #f0f0f0;
}

/* Tagesnummer – erhöhter z-Index, damit sie immer oben liegt */
.day .day-number {
  position: relative;
  z-index: 10; /* Der höchste z-index, damit die Tagesnummer immer oben liegt */
  color: #fff;
  font-weight: bold;
  padding: 0.2rem;
}

/* Kennzeichnung heutiger Tag */
.day.today .day-number {
  background-color: #ffeb3b;
  color: #000;
  border-radius: 3px;
}

/* Interne Events (Jan/Carina) – keine Opazität, volle Deckkraft */
.event-jan, .event-carina {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 1;
  /* Entfernt: opacity: 0.8; */
}

.event-jan { background-color: var(--color-blue); left: 0; }
.event-carina { background-color: var(--color-fuchsia); left: 0; }

/* NEU: Start- und Enddaten mit hälftiger Einfärbung */
.event-jan.event-start, .event-carina.event-start {
  width: 50%;
  left: 50%; /* Rechte Hälfte des Tages */
}

.event-jan.event-end, .event-carina.event-end {
  width: 50%;
  left: 0; /* Linke Hälfte des Tages */
}

/* Spezialfall: Tag ist sowohl Ende eines Zeitraums als auch Start eines anderen */
.transition-day .event-jan, .transition-day .event-carina {
  width: 50%;
}

.transition-day .event-jan.event-end,
.transition-day .event-carina.event-end {
  left: 0;
}

.transition-day .event-jan.event-start,
.transition-day .event-carina.event-start {
  left: 50%; 
}

/* Feiertage */
.day.holiday .day-number,
.day.feiertage .day-number {
  color: var(--color-system-feiertage);
}

/* Schulferien */
.day.vacation,
.day.ferien {
  position: relative;
  z-index: 4;
}

.day.vacation::before,
.day.ferien::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--color-system-ferien);
  z-index: 5;
}

/* Urlaubs-Indikatoren für verschiedene Benutzer */
.urlaub-indicator {
  width: 100%;
  height: 4px;
  display: block;
  margin-top: 2px;
  margin-bottom: 1px;
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  border-radius: 2px;
  background-color: #ccc; /* Standard-Farbe */
}

/* Die spezifischen Farbdefinitionen werden entfernt, da sie von get_colors.php dynamisch erzeugt werden */
/* Die urlaub-[username] Klassen werden über CSS-Variablen in get_colors.php definiert */

/* Generischer Stil für unbekannte Benutzer mit einem dunklen Grau */
.urlaub-indicator:not([class*="urlaub-"]) {
  background-color: #718096; /* dunkelgrau */
}

/* Google Kalender Indikatoren */
.google-event-indicator {
  width: 95%;
  white-space: nowrap;
  text-overflow: ellipsis;
  height: 16px;
  margin: 2px 0;
  padding-left: 2px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #fff;
  font-size: 12px;
  overflow: hidden;
  opacity: 1;
  z-index: 4;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Schatten für alle Events */
}

/* Icon für ganztägige Termine */
.google-event-indicator.all-day::before {
  content: "\f185 ";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #ffc107;
  font-size: 10px;
  margin-right: 2px;
}

.google-events-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}



/* Add-Button für Google-Kalender-Einträge */
.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--color-button);
  color: white;
  font-size: 18px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 0;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.add-button:hover {
  background-color: var(--color-button-hover);
}

/* Modal für Google Kalender Termine */
#google-event-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 11000;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
}

#google-event-modal.hidden {
  display: none !important;
}

#google-event-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 90%;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Overlay-Header mit Konsistenz */
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin: 25px 0 15px 0;
}

.overlay-header h2 {
  margin: 0;
}

/* Buttons im Modal */
#google-event-modal .btn {
  padding: 8px 15px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  color: white;
  transition: background-color 0.2s, transform 0.2s;
}

#google-event-modal .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Overlays und Modals */
.overlay, .modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.hidden { display: none !important; }

.overlay-content, .modal-content {
  background: #fff;
  width: 90%;
  max-width: 600px;
  max-height: 90%;
  overflow-y: auto;
  padding: 1rem;
  border-radius: 5px;
  position: relative;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: left;
}

/* Buttons */
button {
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  margin-right: 0.2rem;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 3px;
}

/* Responsive Anpassungen für kleine Bildschirme */
@media (max-width: 600px) {
  .header, .week {
    grid-template-columns: 40px repeat(7, 1fr);
  }
  .week-number-header, .week-number {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
  .day, .day-header {
    padding: 0.3rem;
    font-size: 0.8rem;
  }
}

/* Wochenbasierte Einfärbung - wird jetzt dynamisch geladen */
/* Die Muster werden über get_week_patterns_css.php bereitgestellt */

.access-rule-note {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px 15px;
  margin-bottom: 10px;
}

/* Spezifischere Stile für die Berechtigungsanzeige */
.permissions-info {
  background-color: #e6f7ff;
  border-left: 4px solid #1890ff;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 3px;
}

.permissions-info p {
  margin: 5px 0;
}

.permissions-info strong {
  font-weight: bold;
}

.permissions-info em {
  font-style: italic;
  color: #999;
}

/* Styles für die Legende */
.legend {
  background-color: #f5f5f5;
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.legend-text {
  font-size: 14px;
}

header.legend .admin-badge {
  background-color: #ff6b6b;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 10px;
}

/* Admin-Seite Styles */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.admin-container h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.admin-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.admin-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.admin-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.admin-card h2 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.admin-card p {
  color: #666;
  margin-bottom: 20px;
  min-height: 60px;
}

.admin-card .btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* Overlay und Modal Styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay.hidden {
  display: none;
}

.overlay-content {
  background-color: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin: 25px 0 15px 0;
}

.overlay-header h2 {
  margin: 0;
}

.overlay-body {
  padding: 0 20px 20px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.close-btn:hover {
  color: #000;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 0 20px;
  padding-bottom: 15px;
  margin: 25px 0 15px 0;
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
}

.modal-body {
  padding: 20px;
}

/* Form Styles */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* Radio-Button-Gruppen mit verbessertem visuellen Feedback */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 15px 0;
}

.radio-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #ffffff;
  position: relative;
  min-height: 50px;
}

.radio-group label:hover {
  border-color: #4CAF50;
  background-color: #f8fff8;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #4CAF50;
}

.radio-group input[type="radio"]:checked + .radio-text {
  font-weight: 600;
  color: #2E7D32;
}

.radio-group label:has(input[type="radio"]:checked) {
  border-color: #4CAF50;
  background-color: #e8f5e8;
  box-shadow: 0 3px 12px rgba(76, 175, 80, 0.25);
}

.radio-group label:has(input[type="radio"]:checked)::before {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4CAF50;
  font-weight: bold;
  font-size: 18px;
}

.radio-text {
  flex: 1;
  transition: all 0.3s ease;
  font-size: 16px;
}

/* Spezielle Styles für Button-Gruppe (falls verwendet) */
.btn-group.person-selection {
  width: 100%;
  margin: 15px 0;
}

.btn-group.person-selection .btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.btn-group.person-selection .btn-check:checked + .btn {
  background-color: #4CAF50;
  border-color: #4CAF50;
  color: white;
  box-shadow: 0 3px 12px rgba(76, 175, 80, 0.3);
}

.btn-group.person-selection .btn:hover {
  border-color: #4CAF50;
  background-color: #f8fff8;
}

/* Personenauswahl für dynamisch erstellte Elemente */
#vacation-person-selection {
  margin: 15px 0;
}

#vacation-person-selection label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #ffffff;
  position: relative;
  min-height: 50px;
  margin-bottom: 8px;
}

#vacation-person-selection label:hover {
  border-color: #4CAF50;
  background-color: #f8fff8;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

#vacation-person-selection input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #4CAF50;
}

#vacation-person-selection input[type="radio"]:checked + span {
  font-weight: 600;
  color: #2E7D32;
}

#vacation-person-selection label:has(input[type="radio"]:checked) {
  border-color: #4CAF50;
  background-color: #e8f5e8;
  box-shadow: 0 3px 12px rgba(76, 175, 80, 0.25);
}

#vacation-person-selection label:has(input[type="radio"]:checked)::before {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4CAF50;
  font-weight: bold;
  font-size: 18px;
}

/* Person-Info für Einzelauswahl */
#vacation-person-selection p {
  background-color: #e3f2fd;
  border: 2px solid #2196F3;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0;
  font-weight: 600;
  color: #1565C0;
  position: relative;
}

#vacation-person-selection p::before {
  content: '👤';
  margin-right: 8px;
}

/* Table Styles */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.data-table th {
  background-color: #f5f5f5;
  font-weight: bold;
  color: #333;
}

.data-table tr:hover {
  background-color: #f9f9f9;
}

.data-table .delete-btn {
  background-color: #e74c3c;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.data-table .delete-btn:hover {
  background-color: #c0392b;
}

/* Admin Badge */
.admin-badge {
  background-color: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  margin-left: 10px;
}

/* Feiertage-Verwaltung Styles */
.actions-bar {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
}

#update-status {
  padding: 8px 15px;
  border-radius: 4px;
  font-weight: bold;
}

.status-updating {
  background-color: #f39c12;
  color: white;
}

.status-success {
  background-color: #2ecc71;
  color: white;
}

.status-error {
  background-color: #e74c3c;
  color: white;
}

.holidays-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.year-section {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
}

.year-section h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #2c3e50;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.no-data {
  text-align: center;
  padding: 30px;
  background-color: #f8f9fa;
  border-radius: 8px;
  color: #666;
  font-style: italic;
}

/* Aktions-Buttons in Tabellen */
.action-button {
  background-color: #e9e9e9;
  border: 1px solid #ddd;
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  margin: 0 5px;
  border-radius: 4px;
  transition: all 0.2s;
  min-width: 35px;
  min-height: 35px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-button:hover {
  background-color: #f0f0f0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.action-button.delete {
  color: #e74c3c;
}

.action-button.delete:hover {
  background-color: #fde8e7;
}

/* Container für die Aktions-Buttons */
.actions-cell {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  white-space: nowrap;
}

/* Overlay-Header mit Konsistenz */
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin: 25px 0 15px 0;
}

.overlay-header h2 {
  margin: 0;
}

.overlay-body {
  padding: 0 20px 20px;
}

/* Konsistentes Styling für Tabellen in Overlays */
.overlay-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.overlay-table th,
.overlay-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.overlay-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

/* Abwechselnde Zeilenfarben */
.overlay-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.overlay-table tr:hover {
  background-color: #f0f0f0;
}

/* Für die "+" Buttons in den Overlays */
.overlay-body .btn {
  font-size: 18px;
  padding: 10px 15px;
  margin-bottom: 15px;
}

/* Auch in den Vacation-Tabellen abwechselnde Zeilenfarben */
.vacation-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.vacation-table tr:hover {
  background-color: #f0f0f0;
}

.vacation-table th,
.vacation-table td {
  padding: 12px 15px;
}

/* Responsive Anpassungen für kleine Bildschirme */
@media (max-width: 600px) {
  .action-button {
    font-size: 18px;
    min-width: 32px;
    min-height: 32px;
    padding: 6px;
    margin: 0 3px;
  }
  
  .overlay-table th,
  .overlay-table td,
  .vacation-table th,
  .vacation-table td {
    padding: 10px 8px;
  }
  
  /* Verkleinerte Schrift und Padding in den Tabellen auf mobilen Geräten */
  .overlay-table {
    font-size: 14px;
  }
  
  /* Spezifische Anpassungen für die Aktions-Zelle */
  .actions-cell {
    padding: 5px;
  }
}

/* Button und Navigation Stile für Verwaltungsseiten */
.admin-navigation {
    margin: 20px 0;
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn:hover {
    background-color: #45a049;
    text-decoration: none;
}

.btn-secondary {
    background-color: #6c757d;
}

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

/* Footer mit Versionsnummer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding: 10px;
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #eee;
}

.version-info {
    display: block;
    margin-bottom: 10px;
}

.version-info a {
    color: #4CAF50;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: 3px;
    transition: background-color 0.3s;
}

.version-info a:hover {
    background-color: #f0f0f0;
    text-decoration: underline;
}

/* Stil für Übernachtungen mit diagonalem Schachbrettmuster */
.event-overnight {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-overnight),
    var(--color-overnight) 5px,
    transparent 5px,
    transparent 10px
  );
  opacity: 0.7;
  z-index: 1; /* Z-Index von 4 auf 1 reduziert, damit es unter Tagesnummern und Google-Ereignissen liegt */
  pointer-events: auto; /* Stellt sicher, dass Klicks erkannt werden */
}

/* Wenn der Mauszeiger über dem Element schwebt */
.event-overnight:hover {
  opacity: 0.9;
  cursor: pointer; /* Zeigt an, dass das Element anklickbar ist */
}

/* Spezialfall für den ersten Tag einer Übernachtung */
.event-overnight.event-start {
  width: 25%;  /* Von 50% auf 25% reduziert */
  left: 75%;   /* Von 50% auf 75% geändert, damit es am rechten Rand steht */
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Spezialfall für den letzten Tag einer Übernachtung */
.event-overnight.event-end {
  width: 25%;  /* Von 50% auf 25% reduziert */
  left: 0;     /* Bleibt am linken Rand */
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Spezialfall: wenn start und end am gleichen Tag sind */
.event-overnight.event-start.event-end {
  border-radius: 4px;
  width: 100%;
  left: 0;
}

.color-box.feier {
  background-color: var(--color-feier);
}

.color-box.overnight,
.color-indicator.overnight {
  background-image: repeating-linear-gradient(
    45deg,
    var(--color-overnight),
    var(--color-overnight) 5px,
    transparent 5px,
    transparent 10px
  );
  background-color: transparent;
}

/* Legende für ganztägige Termine */
.color-box.all-day-indicator {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  border: 2px dashed rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: white;
}

/* Modal für manuelle Google Kalender Einträge */
#calendar-event-modal .modal-content {
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

#calendar-event-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

#calendar-event-modal .modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

#calendar-event-modal .modal-body {
  padding: 15px;
}

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

#calendar-event-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #495057;
}

#calendar-event-form input[type="text"],
#calendar-event-form input[type="date"],
#calendar-event-form input[type="time"],
#calendar-event-form select,
#calendar-event-form textarea {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  background-color: #fff;
  font-size: 1rem;
}

#calendar-event-form textarea {
  height: 100px;
  resize: vertical;
}

#calendar-event-form .form-actions {
  margin-top: 20px;
  text-align: right;
}

#save-calendar-event {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
}

/* Floating Action Button für neue Termine */
.floating-action-button {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-button, #4CAF50);
  color: white;
  font-size: 28px;
  border: none;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  cursor: pointer;
  z-index: 990; /* Niedrigerer Wert als Modals (9999) aber höher als normale Elemente */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  -webkit-tap-highlight-color: transparent; /* Entfernt Hervorhebung beim Antippen auf mobilen Geräten */
  touch-action: manipulation; /* Verbessert Touch-Interaktion */
}

.floating-action-button:hover {
  background-color: var(--color-button-hover, #45a049);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.19), 0 3px 6px rgba(0, 0, 0, 0.23);
  transform: translateY(-2px);
}

.floating-action-button:active {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16), 0 2px 5px rgba(0, 0, 0, 0.23);
  transform: translateY(1px);
}

/* Spezifischere Regel für das X zum Schließen */
#google-event-modal-content #google-event-modal-close {
  cursor: pointer;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  position: absolute;
  top: 15px;
  right: 15px;
  margin: 0;
  padding: 0;
  z-index: 12000; /* Höher als das Modal selbst */
}

/* Feedback-Nachrichten */
.feedback {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 10001;
  min-width: 250px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  font-weight: 500;
  animation: slideIn 0.3s ease-out;
}

.feedback.success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.feedback.error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.feedback.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.feedback.info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Benutzerdefinierten Bestätigungsdialog */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
  padding: 24px;
  text-align: center;
  animation: scaleIn 0.2s ease-out;
}

.confirm-dialog h3 {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.confirm-dialog p {
  margin: 0 0 8px 0;
  color: #666;
  font-size: 14px;
  line-height: 1.4;
}

.confirm-dialog p:last-of-type {
  margin: 0 0 24px 0;
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.confirm-dialog .button-container {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.confirm-dialog button {
  background: #f1f1f1;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.confirm-dialog button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirm-dialog button:first-child {
  color: #666;
}

.confirm-dialog button:last-child {
  background: #e74c3c;
  color: white;
}

.confirm-dialog button:last-child:hover {
  background: #c0392b;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Standard-Farbklassen für zeitgebundene Termine */
.google-event-max {
  background-color: var(--color-google-max);
}
.google-event-paulina {
  background-color: var(--color-google-paulina);
}
.google-event-beide {
  background-color: var(--color-google-beide);
}
.google-event-default {
  background-color: #cccccc; /* Grau für Events ohne Kategorie */
  color: #333333;
}

.form-actions {
  margin-top: 25px;
  text-align: right;
}

/* Zeitraum-Modal Personenauswahl - einheitliches Design */
#calendar-modal .radio-group {
  margin: 15px 0;
}

#calendar-modal .person-choice-label,
.person-choice-label {
  font-weight: normal;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #ffffff;
  position: relative;
  min-height: 50px;
  margin-bottom: 8px;
}

#calendar-modal .person-choice-label:hover,
.person-choice-label:hover {
  border-color: #4CAF50;
  background-color: #f8fff8;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

#calendar-modal .person-choice-label input[type="radio"],
.person-choice-label input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: #4CAF50;
}

#calendar-modal .person-choice-label:has(input[type="radio"]:checked),
.person-choice-label:has(input[type="radio"]:checked) {
  border-color: #4CAF50;
  background-color: #e8f5e8;
  box-shadow: 0 3px 12px rgba(76, 175, 80, 0.25);
}

#calendar-modal .person-choice-label:has(input[type="radio"]:checked)::before,
.person-choice-label:has(input[type="radio"]:checked)::before {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #4CAF50;
  font-weight: bold;
  font-size: 18px;
}

#calendar-modal .person-choice-label input[type="radio"]:checked + .radio-text,
.person-choice-label input[type="radio"]:checked + .radio-text {
  font-weight: 600;
  color: #2E7D32;
}

