/* calendar.css — moderner Buchungskalender im Portal-Style */
.section-calendar { background: var(--cream); }

.calendar-container {
  max-width: 500px; margin: 0 auto;
  /* light veil over the parchment so the dates stay readable on the texture */
  background:
    linear-gradient(rgba(250, 248, 243, 0.62), rgba(250, 248, 243, 0.62)),
    url("../images/Assets/parchment.jpg") center / cover,
    var(--paper);
  border: 1px solid rgba(38, 35, 32, 0.35);
  border-radius: 12px;
  box-shadow: 0 10px 30px -18px rgba(30, 26, 22, 0.5);
  overflow: hidden;
}

.cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--stone-light);
}

.cal-header h3 {
  font-size: 1.2rem; font-weight: 400; color: var(--charcoal);
  min-width: 180px; text-align: center;
}

.cal-nav {
  background: none; border: none; color: var(--charcoal); width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}

.cal-nav:hover { background: var(--cream); color: var(--teal); }

.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 0.8rem 1rem 0.4rem; gap: 0;
}

.cal-weekday {
  font-size: 0.76rem; font-weight: 600; color: var(--charcoal);
  text-align: center; text-transform: uppercase; letter-spacing: 0.08em;
}

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  /* always six week rows — the calendar keeps its height when the month changes */
  grid-template-rows: repeat(6, minmax(44px, 1fr));
  padding: 0 1rem 1rem; gap: 2px;
}

.cal-day {
  min-height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 0.98rem; cursor: default; position: relative;
  transition: all 0.15s; border-radius: 0;
}

.cal-day.empty { background: none; }
.cal-day.past { color: rgba(38, 35, 32, 0.42); }
.cal-day.available { color: var(--charcoal); font-weight: 500; cursor: pointer; }
.cal-day.available:hover { background: var(--cream); border-radius: 50%; }
.cal-day.booked {
  color: var(--white); background: var(--terracotta); opacity: 0.85;
  text-decoration: line-through; cursor: not-allowed;
}
.cal-day.blocked {
  color: var(--stone); background: repeating-linear-gradient(
    45deg, transparent, transparent 3px, var(--stone-light) 3px, var(--stone-light) 4px
  ); cursor: not-allowed;
}

/* Date Range Selection */
.cal-day.range-start { background: var(--teal); color: var(--white); border-radius: 50% 0 0 50%; }
.cal-day.range-end { background: var(--teal); color: var(--white); border-radius: 0 50% 50% 0; }
.cal-day.range-mid { background: rgba(61, 122, 110, 0.12); color: var(--teal-dark); }
.cal-day.range-start.range-end { border-radius: 50%; }

/* Date Picker Bar */
.cal-picker {
  display: flex; gap: 0; border-bottom: 1px solid var(--stone-light);
}

.cal-picker-field {
  flex: 1; padding: 0.9rem 1.2rem; cursor: pointer; transition: background 0.2s;
  border-right: 1px solid var(--stone-light);
}
.cal-picker-field:last-child { border-right: none; }
.cal-picker-field.active { background: var(--cream); }

.cal-picker-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--charcoal); font-weight: 600; margin-bottom: 0.2rem;
}

.cal-picker-value {
  font-size: 0.95rem; color: var(--charcoal); font-weight: 400;
}

.cal-picker-value.empty { color: var(--charcoal-light); }

/* Legend */
.cal-legend {
  display: flex; gap: 1.2rem; justify-content: center;
  padding: 1rem; flex-wrap: wrap;
}

.cal-legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; color: var(--charcoal); }
.cal-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.cal-legend-dot.avail { background: var(--cream); border: 1px solid var(--stone); }
.cal-legend-dot.book { background: var(--terracotta); }
.cal-legend-dot.block { background: var(--stone-light); }

/* Contact Box */
.cal-contact {
  text-align: center; margin-top: 2rem; padding: 1.5rem;
  background: var(--white); border-radius: 12px; max-width: 500px;
  margin-left: auto; margin-right: auto; box-shadow: 0 2px 15px var(--shadow);
}

.cal-phone {
  font-family: var(--font-heading); font-size: 1.6rem;
  color: var(--teal-dark); margin: 0.5rem 0;
}
.cal-phone a { color: var(--teal-dark); }
.cal-phone a:hover { color: var(--terracotta); }

.cal-email { font-size: 0.95rem; margin: 0.3rem 0; }
.cal-email a { color: var(--teal); }

.cal-cta {
  display: inline-block; margin-top: 1rem; padding: 0.75rem 2rem;
  background: var(--teal); color: var(--white); border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; transition: background 0.3s;
}
.cal-cta:hover { background: var(--teal-dark); color: var(--white); }

@media (max-width: 560px) {
  .calendar-container { border-radius: 0; }
  .cal-grid { grid-template-rows: repeat(6, minmax(38px, 1fr)); }
  .cal-day { min-height: 38px; font-size: 0.9rem; }
}