.dialog-open { overflow: hidden; }
.appointment-time-overlay { position: fixed; inset: 0; z-index: 60; padding: 18px; display: grid; place-items: center; background: rgb(31 50 65 / 48%); backdrop-filter: blur(5px); }
.appointment-time-panel { width: min(100%, 400px); max-height: calc(100svh - 36px); overflow: hidden; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgb(22 45 62 / 28%); animation: date-panel-in 180ms ease-out; }
.appointment-time-header { min-height: 61px; padding: 13px 17px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f4; }
.appointment-time-header h2 { margin: 0; color: var(--text); font-size: calc(17px + var(--font-extra, 0px)); }
.appointment-time-header button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f0f5f8; color: #71828e; font-size: calc(22px + var(--font-extra, 0px)); }
.appointment-date-list { min-height: 320px; max-height: 62svh; overflow-y: auto; padding: 13px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; align-content: start; background: #f7f9fb; }
.appointment-date-option { min-height: 65px; padding: 11px; display: grid; gap: 5px; justify-items: start; border: 1px solid #e0e7ec; border-radius: 12px; background: #fff; color: #4e6473; text-align: left; }
.appointment-date-option strong { font-size: calc(11px + var(--font-extra, 0px)); }
.appointment-date-option small { color: #72a782; font-size: calc(9px + var(--font-extra, 0px)); }
.appointment-date-option.is-selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); box-shadow: inset 0 0 0 1px #b7d9f8; }
.appointment-date-option.is-full { background: #f3f4f5; color: #adb7bd; cursor: not-allowed; }
.appointment-date-option.is-full small { color: #c48787; }
.appointment-time-confirm { min-height: 49px; margin: 11px 14px max(11px, env(safe-area-inset-bottom)); border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 700; }
.appointment-time-confirm:disabled { background: #dce3e8; color: #a5b0b8; box-shadow: none; cursor: not-allowed; }
.date-load-error { grid-column: 1 / -1; margin: 40px 0; color: #9a6a6a; text-align: center; font-size: calc(11px + var(--font-extra, 0px)); }

.availability-manager { margin-bottom: 26px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgb(70 91 105 / 7%); }
.availability-editor { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 9px; }
.availability-date { min-height: 67px; padding: 10px 12px; display: grid; gap: 5px; justify-items: start; border: 1px solid #dfe5e9; border-radius: 12px; background: #f9fbfc; color: #465862; cursor: pointer; }
.availability-date strong { font-size: calc(13px + var(--font-extra, 0px)); }
.availability-date small { color: #649372; font-size: calc(11px + var(--font-extra, 0px)); }
.availability-date:hover { border-color: var(--blue); }
.availability-date.is-full { border-color: #efb6b6; background: #fff1f1; color: #a74b4b; }
.availability-date.is-full small { color: #cf5d5d; }

@keyframes date-panel-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
@keyframes date-sheet-in { from { transform: translateY(100%); } }
@media (max-width: 620px) {
  .appointment-time-overlay { padding: 0; place-items: end center; }
  .appointment-time-panel { width: min(100%, 430px); max-height: 88svh; border-radius: 22px 22px 0 0; animation-name: date-sheet-in; }
  .appointment-date-list { max-height: 62svh; }
  .availability-manager { padding: 17px; }
  .availability-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .appointment-time-panel { animation: none; } }
