/* AVAILABILITY SECTION — embedded on the homepage, reuses tokens from style.css */

html {
  scroll-behavior: smooth;
}

.availability-section {
  background: var(--bg-light);
  padding: 60px 20px 70px;
  scroll-margin-top: 84px;
}

.avail-card {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

.avail-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.avail-cal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--navy);
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: var(--navy);
  font-size: 1.15rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cal-nav-btn:hover {
  background: var(--bg-light);
}

.avail-cal-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.button-secondary-small {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #e4e7ec;
  background: #fff;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.button-secondary-small:hover {
  background: var(--bg-light);
}

#avail-month-jump {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #e4e7ec;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-main);
  min-width: 0;
  flex: 1 1 140px;
}

.avail-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.avail-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-available { background: #1a9e5c; }
.dot-partial { background: #d8a02c; }
.dot-unavailable { background: #d1453b; }

.avail-weekday-row,
.avail-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.avail-weekday-row {
  margin-bottom: 6px;
}

.avail-weekday-row span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.cal-day {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--bg-light);
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.cal-day.cal-empty {
  background: transparent;
  cursor: default;
}

.cal-day.cal-available {
  background: #e9f7ef;
  color: #0f5c34;
  font-weight: 600;
}

.cal-day.cal-partial {
  background: #fdf3df;
  color: #8a611c;
  font-weight: 600;
}

.cal-day.cal-unavailable {
  background: #fbeceb;
  color: #8a2c25;
}

.cal-day.cal-past {
  opacity: 0.55;
}

.cal-day.cal-today {
  box-shadow: inset 0 0 0 2px var(--gold-dark);
}

.cal-day.cal-selected {
  box-shadow: inset 0 0 0 2px var(--navy);
}

.cal-day.has-note::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.cal-day.has-hourly {
  border-bottom: 3px solid currentColor;
}

.avail-detail-panel {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg-light);
  border: 1px solid #e4e7ec;
}

.avail-detail-panel h4 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.95rem;
}

.avail-detail-status {
  margin: 0;
  font-weight: 700;
  font-size: 0.88rem;
}

.status-available { color: #0f5c34; }
.status-partial { color: #8a611c; }
.status-unavailable { color: #8a2c25; }

.avail-detail-hours {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.hour-slot {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.hour-open {
  background: #e9f7ef;
  color: #0f5c34;
}

.hour-closed {
  background: #fbeceb;
  color: #8a2c25;
  text-decoration: line-through;
  opacity: 0.75;
}

.avail-detail-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fffdf6;
  border: 1px solid #e8d79c;
  color: #5a4a1e;
  font-size: 0.84rem;
}

.avail-status-message {
  margin: 12px 0 0;
  min-height: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 560px) {
  .avail-card { padding: 16px; }
  .availability-section { padding: 46px 16px 56px; }
  .cal-day { font-size: 0.76rem; border-radius: 7px; }
  .avail-grid, .avail-weekday-row { gap: 4px; }
}
