/**
 * Buchungsportal - Stylesheet
 *
 * DEPLOYMENT: www.fenster-dresden.de/termine/
 * Farbschema: Angepasst an www.fenster-dresden.de (Rot/Bordeaux)
 *
 * @package TermineWWW
 * @version 1.1.0
 */

:root {
  /* Hauptfarben - passend zu fenster-dresden.de */
  --primary: #8b0000;
  /* Dunkelrot/Bordeaux */
  --primary-dark: #5c0000;
  --primary-light: #f8e0e0;
  --primary-rgb: 139, 0, 0;

  /* Akzentfarbe - Gelb/Gold aus dem Logo */
  --accent: #d4a017;
  --accent-light: #fff3cd;

  /* Status-Farben */
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #0dcaf0;

  /* Grautöne */
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
}

body {
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  background-color: var(--gray-100);
}

/* Fortschrittsanzeige */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-300);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step.active .step-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step.completed .step-circle {
  background: var(--primary);
  color: white;
}

.step.completed .step-circle::after {
  content: "✓";
  font-size: 1.2rem;
}

.step.completed .step-circle span {
  display: none;
}

.step-label {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--gray-600);
  text-align: center;
  max-width: 80px;
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

.step-line {
  width: 60px;
  height: 3px;
  background: var(--gray-300);
  margin: 0 10px;
  margin-bottom: 24px;
}

@media (max-width: 576px) {
  .step-label {
    display: none;
  }
  .step-line {
    width: 30px;
    margin-bottom: 0;
  }
}

/* Themen-Karten */
.thema-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.thema-card i {
  font-size: 2.5rem;
  color: var(--primary);
}

.thema-card span {
  font-weight: 500;
  color: var(--gray-600);
}

.thema-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.thema-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.thema-card.selected i,
.thema-card.selected span {
  color: var(--primary-dark);
}

/* Kalender */
.calendar {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

.calendar-day-header {
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--gray-600);
}

.calendar-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-100);
  position: relative;
  transition: all 0.2s ease;
}

.calendar-day .day-number {
  font-weight: 500;
  font-size: 0.9rem;
}

.calendar-day.empty {
  background: var(--gray-50);
}

.calendar-day.heute .day-number {
  font-weight: 700;
}

.calendar-day.heute::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
}

.calendar-day.buchbar {
  cursor: pointer;
  background: #e8f5e9;
}

.calendar-day.buchbar:hover {
  background: var(--primary-light);
  transform: scale(1.1);
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.calendar-day.buchbar .day-number {
  color: var(--primary-dark);
}

.calendar-day.ausgebucht {
  background: #fff3e0;
}

.calendar-day.ausgebucht .day-number {
  color: #e65100;
}

.calendar-day.nicht_buchbar {
  background: var(--gray-100);
}

.calendar-day.nicht_buchbar .day-number {
  color: var(--gray-400);
}

.calendar-day.selected {
  background: var(--primary) !important;
}

.calendar-day.selected .day-number {
  color: white !important;
}

.calendar-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--gray-600);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot.buchbar {
  background: #e8f5e9;
  border: 1px solid var(--primary);
}

.legend-dot.ausgebucht {
  background: #fff3e0;
  border: 1px solid #e65100;
}

.legend-dot.nicht-buchbar {
  background: var(--gray-200);
  border: 1px solid var(--gray-400);
}

/* Zeitslots */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.slot-btn {
  width: 100%;
  padding: 12px 10px;
  border: 2px solid var(--primary);
  background: white;
  border-radius: 8px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slot-btn:hover:not(.disabled) {
  background: var(--primary);
  color: white;
}

.slot-btn.disabled {
  border-color: var(--gray-300);
  color: var(--gray-400);
  cursor: not-allowed;
  background: var(--gray-100);
}

.slot-btn.disabled small {
  font-size: 0.7rem;
}

/* Formular */
.form-control:focus,
.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .calendar-day .day-number {
    font-size: 0.8rem;
  }

  .slots-grid {
    grid-template-columns: 1fr;
  }

  .thema-card {
    padding: 15px 10px;
  }

  .thema-card i {
    font-size: 2rem;
  }
}

/* Animationen */
.booking-step {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.thema-card.selected {
  animation: pulse 0.3s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Karten & Layout */
.card {
  border-radius: 12px;
}

.card-header {
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 1.25rem;
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */
.btn-success {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-success:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-success {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-success:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Text-Farben überschreiben */
.text-success {
  color: var(--primary) !important;
}

/* Header-Hintergrund */
.bg-success {
  background-color: var(--primary) !important;
}

/* Alert-Success */
.alert-success {
  background-color: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Border-Success */
.border-success {
  border-color: var(--primary) !important;
}

/* Form-Check */
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Focus-States */
.form-control:focus,
.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

/* Buchbare Tage im Kalender - etwas heller */
.calendar-day.buchbar {
  background: var(--primary-light);
}

.calendar-day.buchbar:hover {
  background: #f0c0c0;
}
