/* Appointment booking calendar — readable single-month view */

.appt-calendar-wrap {
  margin: 1.25rem 0;
  padding: 1.15rem 1.25rem 1.35rem;
  background: linear-gradient(165deg, #f8fafc 0%, #fff 55%, #f1f5f9 100%);
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.appt-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.appt-calendar-nav__center {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.appt-calendar-nav h3 {
  margin: 0;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  color: var(--md-secondary, #1b4965);
  line-height: 1.25;
}

.appt-calendar-nav__hint {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.35;
}

.appt-cal-nav-btn {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--md-secondary, #1b4965);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.appt-cal-nav-btn:hover:not(:disabled) {
  background: #f8fafc;
  border-color: var(--md-primary, #e85d04);
  color: var(--md-primary, #e85d04);
}

.appt-cal-nav-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.appt-cal-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.appt-cal-nav-btn .material-icons-round {
  font-size: 1.45rem !important;
}

.appt-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e8eef5;
}

.appt-legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.appt-legend-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.appt-legend--available .appt-legend-pill__dot { background: #22c55e; }
.appt-legend--partial .appt-legend-pill__dot {
  background: linear-gradient(135deg, #22c55e 50%, #ef4444 50%);
}
.appt-legend--full .appt-legend-pill__dot { background: #ef4444; }
.appt-legend--none .appt-legend-pill__dot { background: #cbd5e1; }

/* Visiting dates only — no full month grid */
.appt-visiting-dates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.55rem;
  max-width: 520px;
  margin: 0 auto;
}

.appt-visiting-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 4.75rem;
  padding: 0.55rem 0.4rem;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #fff;
  color: var(--md-secondary, #1b4965);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
}

.appt-visiting-date:hover:not(:disabled) {
  border-color: var(--md-primary, #e85d04);
  box-shadow: 0 4px 14px rgba(232, 93, 4, 0.12);
}

.appt-visiting-date:active:not(:disabled) {
  transform: scale(0.97);
}

.appt-visiting-date:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.appt-visiting-date--available {
  border-color: #86efac;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}

.appt-visiting-date--partial {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}

.appt-visiting-date--full {
  border-color: #fecaca;
  background: linear-gradient(180deg, #fef2f2 0%, #fff 100%);
}

.appt-visiting-date--selected {
  border-color: var(--md-primary, #e85d04);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.25);
}

.appt-visiting-date--today .appt-visiting-date__day {
  color: var(--md-primary, #e85d04);
}

.appt-visiting-date__weekday {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.appt-visiting-date__day {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.appt-visiting-date__meta {
  font-size: 0.68rem;
  font-style: normal;
  color: #64748b;
}

.appt-visiting-date__avail {
  color: #15803d;
  font-style: normal;
  font-weight: 600;
}

.appt-visiting-date__booked {
  color: #b91c1c;
  font-style: normal;
  font-weight: 600;
}

.appt-calendar-months {
  display: block;
  max-width: 420px;
  margin: 0 auto;
}

.appt-calendar-month {
  padding: 0.85rem 0.65rem 0.75rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e8eef5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.appt-calendar-month__title {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.appt-calendar-grid {
  width: 100%;
}

.appt-calendar-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 6px;
}

.appt-calendar-weekdays span {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0;
}

.appt-calendar-days {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.appt-day {
  position: relative;
  min-height: 52px;
  min-width: 0;
  width: 100%;
  padding: 0.35rem 0.15rem 0.3rem;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: #334155;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  transition: border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.appt-day:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}

.appt-day--pad {
  background: transparent !important;
  border: none !important;
  min-height: 0;
  box-shadow: none !important;
  pointer-events: none;
}

.appt-day--available {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.appt-day--partial {
  background: linear-gradient(160deg, #ecfdf5 0%, #fef2f2 100%);
  border-color: #86efac;
}

.appt-day--full {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.appt-day--none {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.appt-day--past,
.appt-day--beyond {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

.appt-day--today:not(.appt-day--pad) {
  box-shadow: inset 0 0 0 2px var(--md-primary, #e85d04);
}

.appt-day--selected {
  border-color: var(--md-primary, #e85d04) !important;
  box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.22);
  background: #fff7ed !important;
}

.appt-day:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.appt-day__num {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
}

.appt-day__status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.appt-day--available .appt-day__status { background: #22c55e; }
.appt-day--partial .appt-day__status { background: linear-gradient(135deg, #22c55e 50%, #ef4444 50%); }
.appt-day--full .appt-day__status { background: #ef4444; }
.appt-day--none .appt-day__status,
.appt-day--past .appt-day__status,
.appt-day--beyond .appt-day__status { background: #cbd5e1; }

.appt-day__counts {
  display: flex;
  gap: 4px;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
}

.appt-day__avail { color: #15803d; }
.appt-day__booked { color: #b91c1c; }

.appt-calendar-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: #64748b;
  font-size: 0.92rem;
}

@media (min-width: 640px) {
  .appt-calendar-months {
    max-width: 480px;
  }

  .appt-day {
    min-height: 58px;
  }

  .appt-day__counts {
    font-size: 0.68rem;
  }
}

@media (max-width: 400px) {
  .appt-calendar-wrap {
    padding: 1rem 0.75rem 1.15rem;
  }

  .appt-cal-nav-btn {
    width: 38px;
    height: 38px;
  }

  .appt-legend-pill {
    font-size: 0.7rem;
    padding: 0.28rem 0.5rem;
  }

  .appt-day {
    min-height: 46px;
    border-radius: 10px;
  }

  .appt-day__num {
    font-size: 0.85rem;
  }

  .appt-day__counts {
    display: none;
  }
}
