/* Clinic v4.3.24 — verified corrective layer. Loaded after responsive-v4323.css. */

/* --------------------------------------------------------------------------
   Role login pages
   responsive-v4323 intentionally relaxes generic max-width values, but that
   also removed the 500px desktop login-card constraint.
   -------------------------------------------------------------------------- */
body.role-login .role-login-shell {
  width: min(100%, 500px) !important;
  max-width: 500px !important;
  margin-inline: auto !important;
}

body.role-login .role-login-panel {
  width: 100% !important;
  max-width: 100% !important;
}

/* --------------------------------------------------------------------------
   Admin checkboxes
   A legacy global .form-check-input rule uses switch dimensions for every
   checkbox. Keep ordinary checkboxes compact and restore intentional switches.
   -------------------------------------------------------------------------- */
body.admin-body input[type="checkbox"] {
  box-sizing: border-box;
}

body.admin-body input[type="checkbox"]:not([role="switch"]) {
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  min-height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
  flex: 0 0 1rem !important;
  padding: 0 !important;
}

body.admin-body .form-check.form-switch .form-check-input,
body.admin-body .weekly-schedule-day .form-switch .form-check-input {
  width: 2.55em !important;
  height: 1.35em !important;
  min-width: 2.55em !important;
  min-height: 1.35em !important;
  max-width: 2.55em !important;
  max-height: 1.35em !important;
  flex-basis: 2.55em !important;
}

body.admin-body .sms-master-switch .form-check-input,
body.admin-body .sms-event-toggle .form-check-input {
  width: 2.8rem !important;
  height: 1.5rem !important;
  min-width: 2.8rem !important;
  min-height: 1.5rem !important;
  max-width: 2.8rem !important;
  max-height: 1.5rem !important;
  flex-basis: 2.8rem !important;
}

body.admin-body .settings-toggle-card > .form-check-input {
  width: 46px !important;
  height: 25px !important;
  min-width: 46px !important;
  min-height: 25px !important;
  max-width: 46px !important;
  max-height: 25px !important;
  flex-basis: 46px !important;
}

body.admin-body .settings-inline-switch .form-check-input,
body.admin-body .settings-toggle-line .form-check-input,
body.admin-body .payment-settings-v436__master .form-check-input,
body.admin-body .patient-switch-card .form-check-input {
  width: 2.5em !important;
  height: 1.35em !important;
  min-width: 2.5em !important;
  min-height: 1.35em !important;
  max-width: 2.5em !important;
  max-height: 1.35em !important;
  flex-basis: 2.5em !important;
}

body.admin-body .admin-update-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-inline: 0;
}

body.admin-body .admin-update-confirmation .form-check-input {
  float: none;
  margin: .35em 0 0 !important;
}

/* --------------------------------------------------------------------------
   Appointment list
   The 12-column table was being compressed to the generic 860px minimum,
   causing codes, dates, phone numbers and badges to break character-by-character.
   -------------------------------------------------------------------------- */
body.admin-body .admin-appointments-card .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: visible;
  overscroll-behavior-inline: contain;
}

@media (min-width: 768px) {
  body.admin-body .admin-appointments-table {
    width: 100% !important;
    min-width: 1260px !important;
    table-layout: fixed !important;
  }

  body.admin-body .admin-appointments-table th,
  body.admin-body .admin-appointments-table td {
    vertical-align: middle;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  body.admin-body .admin-appointments-table th:nth-child(1),
  body.admin-body .admin-appointments-table td:nth-child(1) { width: 48px; }
  body.admin-body .admin-appointments-table th:nth-child(2),
  body.admin-body .admin-appointments-table td:nth-child(2) { width: 96px; }
  body.admin-body .admin-appointments-table th:nth-child(3),
  body.admin-body .admin-appointments-table td:nth-child(3) { width: 112px; }
  body.admin-body .admin-appointments-table th:nth-child(4),
  body.admin-body .admin-appointments-table td:nth-child(4) { width: 118px; }
  body.admin-body .admin-appointments-table th:nth-child(5),
  body.admin-body .admin-appointments-table td:nth-child(5) { width: 118px; }
  body.admin-body .admin-appointments-table th:nth-child(6),
  body.admin-body .admin-appointments-table td:nth-child(6) { width: 122px; }
  body.admin-body .admin-appointments-table th:nth-child(7),
  body.admin-body .admin-appointments-table td:nth-child(7) { width: 104px; }
  body.admin-body .admin-appointments-table th:nth-child(8),
  body.admin-body .admin-appointments-table td:nth-child(8) { width: 78px; }
  body.admin-body .admin-appointments-table th:nth-child(9),
  body.admin-body .admin-appointments-table td:nth-child(9) { width: 98px; }
  body.admin-body .admin-appointments-table th:nth-child(10),
  body.admin-body .admin-appointments-table td:nth-child(10) { width: 178px; }
  body.admin-body .admin-appointments-table th:nth-child(11),
  body.admin-body .admin-appointments-table td:nth-child(11) { width: 84px; }
  body.admin-body .admin-appointments-table th:nth-child(12),
  body.admin-body .admin-appointments-table td:nth-child(12) { width: 86px; }

  body.admin-body .admin-appointments-table .cell-ltr,
  body.admin-body .admin-appointments-table td:nth-child(2),
  body.admin-body .admin-appointments-table td:nth-child(4),
  body.admin-body .admin-appointments-table td:nth-child(5),
  body.admin-body .admin-appointments-table td:nth-child(7),
  body.admin-body .admin-appointments-table td:nth-child(8),
  body.admin-body .admin-appointments-table td:nth-child(9),
  body.admin-body .admin-appointments-table td:nth-child(11),
  body.admin-body .admin-appointments-table td:nth-child(12) {
    white-space: nowrap;
  }

  body.admin-body .admin-appointments-table .admin-confirmation-cell {
    min-width: 0;
  }

  body.admin-body .admin-appointments-table .admin-confirmation-cell .badge {
    width: 100%;
    max-width: 100%;
    white-space: normal;
    line-height: 1.45;
  }

  body.admin-body .admin-appointments-table .admin-table-actions,
  body.admin-body .admin-appointments-table .admin-col-actions {
    width: 86px !important;
    min-width: 86px !important;
  }
}

body.admin-body .admin-appointments-table input[type="checkbox"] {
  display: inline-block;
  margin: 0 auto !important;
}

/* --------------------------------------------------------------------------
   Public shell, mobile drawer and floating dock
   -------------------------------------------------------------------------- */
html,
body.public-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  overflow-x: hidden;
  overflow-x: clip;
}

body.public-shell {
  margin: 0 !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

body.public-shell > .meet-site-header,
body.public-shell > .meet-site-main,
body.public-shell > .meet-site-footer {
  display: block;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-inline: 0 !important;
  transform: none !important;
}

body.public-shell .doctor-mobile-drawer__nav a > .doctor-mobile-drawer__nav-icon {
  display: grid !important;
  place-items: center;
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 0 !important;
}

body.public-shell .doctor-mobile-drawer__nav a > .doctor-mobile-drawer__nav-label {
  display: block !important;
  flex: 1 1 auto !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

@media (max-width: 991.98px) {
  body.public-shell .doctor-mobile-drawer.meet-mobile-drawer {
    right: 0 !important;
    left: auto !important;
    width: min(304px, 80vw) !important;
    min-width: 0 !important;
    max-width: 80vw !important;
    margin: 0 !important;
  }

  body.admin-body .admin-sidebar {
    width: min(300px, 82vw) !important;
    max-width: 82vw !important;
  }
}

@media (max-width: 767.98px) {
  body.role-login {
    padding: 12px !important;
  }

  body.role-login .role-login-shell {
    width: min(100%, 500px) !important;
    max-width: 500px !important;
  }

  /* Booking: neutralize every retained desktop grid/width and build one column. */
  body.public-shell.booking-page-v4320,
  body.public-shell.booking-page-v4320 .meet-site-main,
  body.public-shell.booking-page-v4320 .booking-redesign-page {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-inline: 0 !important;
    transform: none !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-page {
    display: block !important;
    padding: 12px 0 calc(100px + env(safe-area-inset-bottom)) !important;
    overflow-x: clip !important;
  }

  body.public-shell.booking-page-v4320 .clinic-booking-container {
    display: block !important;
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-header,
  body.public-shell.booking-page-v4320 .booking-redesign-shell {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-card {
    order: 1;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-aside {
    order: 2;
    position: static !important;
    inset: auto !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-aside,
  body.public-shell.booking-page-v4320 .booking-redesign-card,
  body.public-shell.booking-page-v4320 .booking-redesign-form,
  body.public-shell.booking-page-v4320 .booking-redesign-section,
  body.public-shell.booking-page-v4320 .booking-redesign-service-grid,
  body.public-shell.booking-page-v4320 .booking-redesign-time-grid,
  body.public-shell.booking-page-v4320 .booking-payment-choice,
  body.public-shell.booking-page-v4320 .booking-payment-choice__options,
  body.public-shell.booking-page-v4320 .booking-redesign-submitbar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-service-grid,
  body.public-shell.booking-page-v4320 .booking-redesign-time-grid,
  body.public-shell.booking-page-v4320 .booking-payment-choice-grid,
  body.public-shell.booking-page-v4320 .booking-payment-choice__options {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-service-card,
  body.public-shell.booking-page-v4320 .booking-redesign-date-field,
  body.public-shell.booking-page-v4320 .booking-redesign-slot-field,
  body.public-shell.booking-page-v4320 .booking-redesign-description,
  body.public-shell.booking-page-v4320 .booking-side-card,
  body.public-shell.booking-page-v4320 .clinic-doctor-chip {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-steps {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-steps > i {
    display: none !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-slot-grid {
    width: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  body.public-shell.booking-page-v4320 .booking-redesign-submitbar,
  body.public-shell.booking-page-v4320 .booking-redesign-submitbar .clinic-booking-submitbar__actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
  }

  /* Dock: the previous overflow:hidden on each item clipped the raised booking icon. */
  body.public-shell .doctor-mobile-dock.meet-mobile-dock {
    position: fixed !important;
    z-index: 1060 !important;
    right: auto !important;
    left: 50% !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    display: grid !important;
    width: min(calc(100% - 16px), 520px) !important;
    min-width: 0 !important;
    max-width: calc(100% - 16px) !important;
    min-height: 68px !important;
    height: 68px !important;
    margin: 0 !important;
    padding: 6px !important;
    overflow: visible !important;
    transform: translateX(-50%) !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: end !important;
    box-sizing: border-box !important;
  }

  body.public-shell .doctor-mobile-dock.meet-mobile-dock > a {
    position: relative;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: 100%;
    padding: 4px 1px !important;
    overflow: visible !important;
  }

  body.public-shell .doctor-mobile-dock.meet-mobile-dock > a > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.public-shell .doctor-mobile-dock__booking > b {
    position: relative;
    z-index: 2;
    width: 48px !important;
    height: 48px !important;
    margin-top: -27px !important;
  }

  body.public-shell.doctor-mobile-drawer-open .doctor-mobile-dock.meet-mobile-dock {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translate(-50%, 120%) !important;
  }
}

@media (max-width: 359.98px) {
  body.public-shell.booking-page-v4320 .booking-redesign-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.public-shell .doctor-mobile-drawer.meet-mobile-drawer {
    width: min(272px, 82vw) !important;
    max-width: 82vw !important;
  }
}
