/* ═══════════════════════════════════════════════════════════════════
 *  NhaBex App v3 — Appointment Page Styles
 *  app-v2/assets/css/appointment.css
 * ═══════════════════════════════════════════════════════════════════ */

/* ── Layout ── */

.appt-page {
  padding: 16px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}

.appt-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .appt-layout {
    grid-template-columns: 1fr 1fr;
  }
}

.appt-section-title {
  font-family: var(--md-sys-typescale-font);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
  color: var(--md-sys-color-on-surface);
  margin: 0 0 12px;
}


/* ── Calendar Overrides (FullCalendar) ── */

.appt-calendar {
  border-radius: var(--md-sys-shape-medium);
  overflow: hidden;
  background: var(--md-sys-color-surface);
  box-shadow: var(--md-sys-elevation-1);
  padding: 8px;
}

.appt-calendar .fc {
  font-family: var(--md-sys-typescale-font);
}

.appt-calendar .fc-toolbar-title {
  font-size: var(--md-sys-typescale-title-medium-size) !important;
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
}

.appt-calendar .fc-button-primary {
  background: var(--md-sys-color-primary) !important;
  border-color: var(--md-sys-color-primary) !important;
  border-radius: var(--md-sys-shape-small) !important;
}

.appt-calendar .fc-daygrid-day-frame {
  cursor: pointer;
  border-radius: var(--md-sys-shape-extra-small);
  transition: background-color 0.15s ease;
}

.appt-calendar .fc-daygrid-day-frame:hover {
  background: var(--md-sys-color-surface-variant);
}

.appt-calendar .fc-daygrid-day-events {
  display: none !important;
}

.appt-calendar .fc-daygrid-day-number,
.appt-calendar .fc .fc-col-header-cell-cushion {
  text-decoration: none !important;
  color: var(--md-sys-color-on-surface);
}

.appt-calendar .fc-day-today {
  background: var(--md-sys-color-primary-container) !important;
}

/* Available date highlight */
.fc-available-date {
  background-color: var(--md-sys-color-primary-10, rgba(0, 179, 136, 0.15)) !important;
}

/* Selected date */
.fc-card-checked {
  background-color: var(--md-sys-color-primary-container) !important;
}

/* Disabled/past dates */
.fc-disabled-date {
  background-color: var(--md-sys-color-surface-variant) !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.4;
}


/* ── Time Slots ── */

.appt-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.appt-time-slot {
  padding: 10px 8px;
  text-align: center;
  border-radius: var(--md-sys-shape-small);
  border: 1px solid var(--md-sys-color-outline-variant);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
  font-size: var(--md-sys-typescale-body-small-size);
  font-weight: 400;
  transition: background-color var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard),
              border-color var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard),
              color var(--md-sys-motion-duration-short-3) var(--md-sys-motion-easing-standard);
}

.appt-time-slot:hover {
  border-color: var(--md-sys-color-primary);
  background: var(--md-sys-color-primary-container);
}

.appt-time-slot--selected {
  background: var(--md-sys-color-primary) !important;
  color: var(--md-sys-color-on-primary) !important;
  border-color: var(--md-sys-color-primary) !important;
}

.appt-time-slot--unavailable {
  opacity: 0.4;
  pointer-events: none;
  text-decoration: line-through;
}


/* ── Form ── */

.appt-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.appt-form .md3-text-field {
  width: 100%;
}

.appt-field-label {
  font-size: var(--md-sys-typescale-label-medium-size);
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 4px;
}

.appt-required {
  color: var(--md-sys-color-error);
  margin-left: 2px;
}


/* ── Summary card ── */

.appt-summary {
  padding: 16px;
  border-radius: var(--md-sys-shape-medium);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.appt-summary__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: var(--md-sys-typescale-body-small-size);
}

.appt-summary__row i {
  width: 20px;
  text-align: center;
}


/* ── Success state ── */

.appt-success {
  text-align: center;
  padding: 48px 24px;
}

.appt-success__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--md-sys-color-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.appt-success__icon i {
  font-size: 36px;
  color: var(--md-sys-color-on-primary-container);
}
