/* =============================================================
   ZEP-Team GmbH – Terminbuchung – booking.css
   Design: Dark-Theme, Raleway, Lindgrün #68b022
   ============================================================= */

/* Raleway Fonts (Lokal gehostet von zep-team.de) */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('https://www.zep-team.de/templates/zepteam/fonts/raleway-v34-latin-200.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('https://www.zep-team.de/templates/zepteam/fonts/raleway-v34-latin-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('https://www.zep-team.de/templates/zepteam/fonts/raleway-v34-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('https://www.zep-team.de/templates/zepteam/fonts/raleway-v34-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('https://www.zep-team.de/templates/zepteam/fonts/raleway-v34-latin-700.woff2') format('woff2');
}

:root {
  --bg-dark:       #1A1C1D;
  --bg-card:       #22252B;
  --bg-input:      #2A2D35;
  --primary:       #68b022;
  --primary-hover: #7dcf28;
  --primary-dim:   #3d6914;
  --text:          #F3F4F6;
  --text-muted:    #9CA3AF;
  --text-dim:      #6B7280;
  --border:        #374151;
  --border-light:  #4B5563;
  --danger:        #EF4444;
  --success:       #10B981;
  --warning:       #F59E0B;
  --radius:        10px;
  --radius-sm:     6px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --transition:    0.2s ease;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Raleway', 'Segoe UI', Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- LAYOUT ---- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: #111314;
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header img {
  height: 46px;
  width: auto;
}

.site-header .tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem 4rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 640px;
  padding: 2rem 1.5rem;
}

.site-footer {
  text-align: center;
  padding: 1.2rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--primary);
}

/* ---- TYPOGRAPHY ---- */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---- STEP INDICATOR ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 2px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(104,176,34,0.2);
}

.step-dot.done {
  background: var(--primary-dim);
  border-color: var(--primary-dim);
  color: var(--primary);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  max-width: 60px;
  transition: var(--transition);
}

.step-line.done {
  background: var(--primary-dim);
}

/* ---- STEP PANELS ---- */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

/* ---- STEP HEADER ---- */
.step-header {
  margin-bottom: 1.5rem;
}

.step-header .step-number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

/* ---- CALENDAR ---- */
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.calendar-nav .month-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.03em;
}

.btn-nav {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-nav:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

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

.cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  padding: 0.3rem 0;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: default;
  transition: var(--transition);
  position: relative;
}

.cal-day.empty {
  /* Leere Zellen */
}

.cal-day.past,
.cal-day.unavailable {
  color: var(--text-dim);
  background: transparent;
  opacity: 0.45;
}

.cal-day.loading {
  color: var(--text-dim);
  font-size: 0.7rem;
}

.cal-day.available {
  background: rgba(104, 176, 34, 0.12);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(104, 176, 34, 0.3);
}

.cal-day.available:hover {
  background: rgba(104, 176, 34, 0.25);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(104, 176, 34, 0.35);
  transform: scale(1.08);
}

.cal-day.selected {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 0 14px rgba(104, 176, 34, 0.5);
}

.cal-day.today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
}

.cal-day.today.past::after,
.cal-day.today.unavailable::after {
  background: var(--text-dim);
}

/* ---- SLOT BUTTONS ---- */
.slot-info {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1.2rem;
  font-size: 0.85rem;
}

.slot-info .info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.slot-info .info-row:last-child {
  margin-bottom: 0;
}

.slot-info .info-row .icon {
  color: var(--primary);
  font-size: 1rem;
  width: 18px;
  flex-shrink: 0;
}

.slot-info .date-highlight {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.slot-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.btn-slot {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-family: inherit;
}

.btn-slot .slot-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}

.btn-slot .slot-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-slot:hover:not(:disabled):not(.slot-unavailable) {
  border-color: var(--primary);
  background: rgba(104, 176, 34, 0.1);
  color: var(--primary);
}

.btn-slot.slot-unavailable {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-slot.selected {
  border-color: var(--primary);
  background: rgba(104, 176, 34, 0.15);
  color: var(--primary);
}

/* ---- FORM ---- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.65rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(104, 176, 34, 0.15);
}

.form-control::placeholder {
  color: var(--text-dim);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.invalid-feedback {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
  display: none;
}

.form-control.is-invalid + .invalid-feedback {
  display: block;
}

/* ---- CHECKBOX ---- */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-group .checkbox-label {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.checkbox-group .checkbox-label a {
  color: var(--primary);
  text-decoration: none;
}

.checkbox-group .checkbox-label a:hover {
  text-decoration: underline;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(104, 176, 34, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(104, 176, 34, 0.1);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.1);
}

.btn-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.btn-actions .btn-secondary {
  flex-shrink: 0;
}

.btn-actions .btn-primary {
  flex: 1;
}

/* ---- CONFIRMATION ---- */
.confirmation-box {
  background: rgba(104, 176, 34, 0.08);
  border: 1px solid rgba(104, 176, 34, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.confirmation-box .confirm-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.8rem;
}

.confirmation-box h3 {
  font-size: 1.2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1rem;
}

.confirm-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.confirm-detail:last-child {
  border-bottom: none;
}

.confirm-detail .detail-label {
  color: var(--text-dim);
  min-width: 90px;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 1px;
}

.confirm-detail .detail-value {
  color: var(--text);
  font-weight: 500;
  flex: 1;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cancel-link-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
}

.cancel-link-box .cancel-label {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.cancel-link-box a {
  color: var(--text-muted);
  word-break: break-all;
  font-size: 0.8rem;
  text-decoration: none;
}

.cancel-link-box a:hover {
  color: var(--primary);
}

/* ---- ALERTS / STATUS ---- */
.alert {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  display: none;
  align-items: flex-start;
  gap: 0.6rem;
}

.alert.show {
  display: flex;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
}

.alert-info {
  background: rgba(104, 176, 34, 0.08);
  border: 1px solid rgba(104, 176, 34, 0.25);
  color: var(--text-muted);
}

/* ---- LOADING ---- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(104, 176, 34, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cal-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ---- STORNIERUNG ---- */
.cancel-page .confirmation-box {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}

.cancel-page .confirmation-box h3 {
  color: var(--danger);
}

.cancel-success {
  text-align: center;
  padding: 2rem 0;
}

.cancel-success .success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cancel-success h2 {
  color: var(--success);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.cancel-success p {
  margin-bottom: 1.5rem;
}

/* ---- DIVIDER ---- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ---- BADGE ---- */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-green {
  background: rgba(104, 176, 34, 0.15);
  color: var(--primary);
  border: 1px solid rgba(104, 176, 34, 0.3);
}

.badge-grey {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ---- RESPONSIVE ---- */
@media (min-width: 480px) {
  .card {
    padding: 2.5rem 2rem;
  }

  h1 {
    font-size: 1.7rem;
  }
}

@media (min-width: 640px) {
  .card {
    padding: 2.5rem 2.5rem;
  }

  .slot-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .slot-buttons {
    grid-template-columns: 1fr;
  }

  .btn-slot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 0.8rem 1rem;
  }

  .btn-slot .slot-title {
    margin-bottom: 0;
  }
}
