/* v5.3.16: scoped RTL time ranges, booking mobile and appointment registry fixes. */
body.public-shell .doctor-schedule-ranges,
body.public-shell .doctor-contact-hours-row__ranges {
  display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0;
}
body.public-shell .doctor-schedule-range {
  display: inline-flex; flex-wrap: nowrap; align-items: baseline; justify-content: flex-start;
  gap: .4em; direction: rtl; unicode-bidi: isolate; white-space: nowrap;
  font-weight: 750; font-variant-numeric: tabular-nums;
}
body.public-shell .doctor-schedule-range bdi { direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
body.public-shell .doctor-contact-hours-row__ranges > .doctor-schedule-range {
  display: inline-flex; flex-direction: row; gap: .45em; width: fit-content;
}
body.public-shell .doctor-schedule-row { min-width: 0; align-items: flex-start; }
body.public-shell .doctor-schedule-row > b { flex: 0 0 auto; }
body.public-shell .doctor-schedule-ranges { font-size: .74rem; line-height: 1.65; }
body.public-shell .doctor-schedule-range > span { font-size: .9em; font-weight: 650; }

/* Public booking overview: digits of the date/time must remain horizontal. */
body.public-shell.booking-page-v4320 :is([data-flow-summary-datetime],#bookingSummaryDate,#bookingSummaryTime,#bookingDockSummary){
  direction: rtl; unicode-bidi: plaintext; font-variant-numeric: tabular-nums;
  overflow-wrap: normal; word-break: normal; line-height: 1.65;
}

@media(max-width: 767.98px){
  body.public-shell .doctor-about-section__card { max-width: min(280px,calc(100vw - 34px)); }
  body.public-shell .doctor-schedule-row { display:grid!important;grid-template-columns: minmax(0,1fr)!important;gap:5px!important; }
  body.public-shell .doctor-schedule-ranges { width: 100%; }
  body.public-shell .doctor-contact-hours-row__ranges{display:flex;flex-direction:row;flex-wrap:wrap;gap:8px;}
  body.public-shell.booking-page-v4320 :is(.booking-easy-review,.booking-final-review-v450,.booking-easy-payment,.booking-confirm-card-v521){min-width:0;max-width:100%;}
  body.public-shell.booking-page-v4320 :is([data-flow-summary-datetime],#bookingSummaryDate){font-size:clamp(.84rem,3.6vw,1rem);}
  body.public-shell.booking-page-v4320 .booking-easy-review :is(strong,button){max-width:100%;}

  /* Registry mobile table: full width action row and readable buttons. */
  body:is(.admin-body,.secretary-body) .registry-table { width:100%!important;min-width:0!important;table-layout:auto; }
  body:is(.admin-body,.secretary-body) .registry-table-wrap { overflow-x:visible!important;max-width:100%; }
  body:is(.admin-body,.secretary-body) .registry-table tbody { width:100%;min-width:0; }
  body:is(.admin-body,.secretary-body) .registry-table tbody tr { width:100%;min-width:0; }
  body:is(.admin-body,.secretary-body) .registry-table tbody tr > td[data-column="actions"] {
    display:block!important;max-width:none!important;min-width:0!important;width:100%!important;
    padding:12px!important;box-sizing:border-box;
  }
  body:is(.admin-body,.secretary-body) .registry-action-group {
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;min-width:0!important;width:100%!important;
  }
  body:is(.admin-body,.secretary-body) .registry-action-group :is(button,.btn){
    display:inline-flex!important;align-items:center;justify-content:center;min-width:0!important;
    width:100%!important;min-height:44px!important;padding:9px 6px!important;
    white-space:normal!important;overflow-wrap:normal!important;word-break:keep-all!important;
    writing-mode:horizontal-tb!important;line-height:1.55!important;text-align:center;
  }
  /* A single placeholder should occupy the entire width of a grid, not a narrow column. */
  body:is(.admin-body,.secretary-body) :is(.staff-upcoming-slots__grid,.slots-grid) > :is(.text-muted,p):only-child {
    grid-column:1/-1!important;display:block!important;width:100%!important;
    max-width:100%!important;min-width:0!important;text-align:center!important;
    white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;
    padding:16px 12px!important;line-height:1.9;
  }
  body:is(.admin-body,.secretary-body) .staff-upcoming-slots__grid,
  body:is(.admin-body,.secretary-body) .staff-date-slots .slots-grid { min-width:0!important; }
  body.secretary-body .secretary-booking-form.staff-quick-booking-v4348>.secretary-form-actions .btn{
    width:100%!important;white-space:normal!important;word-break:keep-all!important;overflow-wrap:normal!important;
    min-height:50px!important;padding:10px 12px!important;line-height:1.6!important;
  }
  body.secretary-body .secretary-booking-form.staff-quick-booking-v4348>.secretary-form-actions .btn span {display:inline!important;}
}
@media(max-width:359.98px){
  body:is(.admin-body,.secretary-body) .registry-action-group {grid-template-columns:minmax(0,1fr)!important;}
}
/* Empty-state text must span the full slots grid also on tablets/desktop. */
body:is(.admin-body,.secretary-body) :is(.staff-upcoming-slots__grid,.slots-grid) > :is(.text-muted,p):only-child {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  text-align: center;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-height: 1.8;
}
