/* ── Schullandheim Buchungssystem ── */
:root {
  --slh-blue:        #2a6496;
  --slh-blue-dark:   #1a3f63;
  --slh-blue-mid:    #3a7bbf;
  --slh-blue-light:  #d6e8f7;
  --slh-teal:        #4a8fa8;
  --slh-green:       #5a9a48;
  --slh-green-light: #e8f5e4;
  --slh-orange:      #e8a020;
  --slh-orange-light:#fdf3e0;
  --slh-red:         #c0392b;
  --slh-red-light:   #fdecea;
  --slh-gray:        #8a919e;
  --slh-gray-light:  #e8eaed;
  --slh-cream:       #f7f3ec;
  --slh-cream-mid:   #eee8dc;
  --slh-border:      rgba(42,100,150,0.15);
  --slh-radius:      6px;
  --slh-shadow:      0 2px 12px rgba(42,100,150,0.1);
}

.slh-buchung-wrap {
  font-family: 'Nunito Sans', 'Nunito', 'Calibri', sans-serif;
  font-size: 15px;
  color: #333740;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Section Layout ── */
.slh-section {
  background: #fff;
  border-radius: var(--slh-radius);
  border: 1px solid var(--slh-border);
  box-shadow: var(--slh-shadow);
  padding: 32px;
  margin-bottom: 28px;
}

.slh-section-header {
  margin-bottom: 20px;
}

.slh-section-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--slh-blue-dark);
  margin: 0 0 6px;
  padding: 0;
  border: none;
}

.slh-section-desc {
  color: var(--slh-gray);
  margin: 0;
  font-size: 0.9rem;
}

/* ── Legend ── */
.slh-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.83rem;
  color: #5a6170;
}

.slh-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slh-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.slh-dot--available { background: var(--slh-green-light); border: 1px solid var(--slh-green); }
.slh-dot--partial   { background: var(--slh-orange-light); border: 1px solid var(--slh-orange); }
.slh-dot--booked    { background: var(--slh-red-light); border: 1px solid var(--slh-red); }
.slh-dot--blocked   { background: var(--slh-gray-light); border: 1px solid var(--slh-gray); }

/* ── Calendar ── */
.slh-calendar {
  user-select: none;
}

.slh-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.slh-cal-btn {
  background: none;
  border: 1px solid var(--slh-border);
  border-radius: var(--slh-radius);
  padding: 6px 14px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--slh-blue);
  transition: background 0.15s, border-color 0.15s;
}
.slh-cal-btn:hover {
  background: var(--slh-blue-light);
  border-color: var(--slh-blue);
}

.slh-cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 680px) {
  .slh-cal-months { grid-template-columns: 1fr; }
  .slh-section { padding: 20px; }
}

.slh-month-title {
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--slh-blue-dark);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.slh-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.slh-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slh-gray);
  padding: 4px 0;
  letter-spacing: 0.04em;
}

.slh-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.slh-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: default;
  transition: background 0.1s, color 0.1s;
  position: relative;
}

.slh-day--empty { background: transparent !important; }

.slh-day--past {
  color: #ccc;
  text-decoration: line-through;
}

.slh-day--available {
  background: var(--slh-green-light);
  color: var(--slh-green);
  cursor: pointer;
  font-weight: 600;
}
.slh-day--available:hover {
  background: var(--slh-green);
  color: #fff;
}

.slh-day--partial {
  background: var(--slh-orange-light);
  color: #a06010;
  cursor: pointer;
  font-weight: 600;
  flex-direction: column;
  gap: 1px;
}
.slh-day--partial:hover {
  background: var(--slh-orange);
  color: #fff;
}

.slh-day-remaining {
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.85;
  white-space: nowrap;
}

.slh-day--booked {
  background: var(--slh-red-light);
  color: var(--slh-red);
  opacity: 0.7;
}

.slh-day--blocked {
  background: var(--slh-gray-light);
  color: #aaa;
}

.slh-day--unknown {
  background: #fafafa;
  color: #ccc;
  cursor: pointer;
}
.slh-day--unknown:hover {
  background: var(--slh-blue-light);
  color: var(--slh-blue);
}

.slh-day--checkin,
.slh-day--checkout {
  background: var(--slh-blue) !important;
  color: #fff !important;
  font-weight: 700;
}

.slh-day--in-range {
  background: var(--slh-blue-light) !important;
  color: var(--slh-blue-dark) !important;
  border-radius: 0;
}

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

.slh-cal-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--slh-gray);
  margin-top: 12px;
}

.slh-cal-loading {
  text-align: center;
  padding: 40px;
  color: var(--slh-gray);
}

/* ── Form ── */
.slh-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.slh-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.slh-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 580px) {
  .slh-form-row { grid-template-columns: 1fr; }
}

.slh-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #5a6170;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.slh-required { color: var(--slh-orange); margin-left: 2px; }

.slh-input,
.slh-select,
.slh-textarea {
  border: 1.5px solid var(--slh-border);
  border-radius: var(--slh-radius);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  color: #333740;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.slh-input:focus,
.slh-select:focus,
.slh-textarea:focus {
  outline: none;
  border-color: var(--slh-blue-mid);
  box-shadow: 0 0 0 3px rgba(42,100,150,0.12);
}

.slh-input--narrow { max-width: 120px; }

.slh-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%232a6496' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

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

.slh-hint {
  font-size: 0.8rem;
  color: var(--slh-gray);
  margin-top: 4px;
}

.slh-divider {
  border: none;
  border-top: 1px solid var(--slh-cream-mid);
  margin: 8px 0 20px;
}

.slh-form-group--checkbox { flex-direction: row; align-items: flex-start; gap: 0; }

.slh-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #5a6170;
}

.slh-checkbox-label a { color: var(--slh-blue); }

.slh-checkbox {
  margin-top: 2px;
  accent-color: var(--slh-blue);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* ── Button ── */
.slh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--slh-radius);
  padding: 13px 32px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
  width: 100%;
}

.slh-btn--primary {
  background: var(--slh-orange);
  color: #fff;
}
.slh-btn--primary:hover {
  background: #c07010;
}
.slh-btn--primary:active {
  transform: scale(0.99);
}
.slh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Alerts ── */
.slh-alert {
  border-radius: var(--slh-radius);
  padding: 12px 16px;
  font-size: 0.9rem;
  margin-top: 12px;
  margin-bottom: 8px;
}

.slh-alert--error {
  background: var(--slh-red-light);
  border: 1px solid rgba(192,57,43,0.3);
  color: var(--slh-red);
}

/* ── Success ── */
.slh-success-msg {
  text-align: center;
  padding: 40px 20px;
}

.slh-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--slh-green);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.slh-success-msg h3 {
  font-family: 'Nunito', sans-serif;
  color: var(--slh-blue-dark);
  font-size: 1.3rem;
  margin: 0 0 12px;
}

.slh-success-msg p {
  color: #5a6170;
  line-height: 1.7;
}

/* ── Calendar-only mode ── */
.slh-buchung-wrap--calendar-only .slh-calendar {
  background: #fff;
  border-radius: var(--slh-radius);
  border: 1px solid var(--slh-border);
  box-shadow: var(--slh-shadow);
  padding: 24px;
}
