/* Administrative text may wrap between words, never inside a word. */
body:has(.clinic-admin) * {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
}

@media (max-width: 767px) {
  body.sc-mobile-screen-open { overflow: hidden !important; }

  .sc-mobile-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    display: block !important;
    box-sizing: border-box !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: calc(54px + env(safe-area-inset-top)) 0 env(safe-area-inset-bottom) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: #f7f9fd !important;
    backdrop-filter: none !important;
    animation: none !important;
  }

  .sc-mobile-screen > :first-child {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: calc(100dvh - 54px - env(safe-area-inset-top)) !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .sc-mobile-screen [class*="overflow-y-auto"] {
    max-height: none !important;
    overflow-y: visible !important;
  }

  .sc-mobile-screen [class*="overflow-auto"] {
    max-height: none !important;
    overflow: visible !important;
  }

  .sc-mobile-screen [class*="max-h-"] { max-height: none !important; }

  .sc-mobile-screen-bar {
    position: fixed;
    z-index: 10001;
    inset: 0 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    height: calc(54px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 14px 0;
    background: #153b72;
    color: white;
    font: 700 13px Montserrat, system-ui, sans-serif;
    box-shadow: 0 2px 10px rgb(15 36 70 / 12%);
  }

  .sc-mobile-screen-back {
    flex: none;
    min-height: 40px;
    padding: 0 8px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: white;
    font: inherit;
    cursor: pointer;
  }

  .sc-mobile-screen-back:active { background: rgb(255 255 255 / 18%); }
  .sc-mobile-screen-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
