/* Phone rules are isolated from the existing desktop layout. No fixed canvas
   width or transform scaling: each component uses the available inline size. */
@media(max-width:900px){
 html{zoom:1!important;scroll-padding-top:70px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
 html body{min-width:0!important;width:100%!important;margin:0;overflow-x:clip!important}
 html body :is(main,section,article,aside,form,header,footer,nav,fieldset){min-inline-size:0}
 html body :is(img,video,canvas){max-inline-size:100%}
 html body :is(input,select,textarea){max-inline-size:100%;box-sizing:border-box;font-size:16px!important}
 html body :is(.container,.sc-wrap){width:calc(100% - 32px)!important;max-width:760px!important;margin-inline:auto!important}
 html body .topbar{padding:8px 0!important}
 html body .topbar .container.topbar-inner{min-height:0!important;height:auto!important;padding:0!important;display:flex!important;flex-wrap:wrap!important;gap:10px!important;justify-content:space-between!important}
 html body .topbar .brand{flex:1 1 230px;gap:9px!important;transform:none!important}
 html body .topbar .brand>div{min-width:0}
 html body .topbar .brand .logo{width:40px!important;height:40px!important;flex:0 0 40px!important}
 html body .topbar .brand-title{font-size:14px!important;line-height:1.3!important;max-width:32ch}
 html body .topbar .brand-subtitle{font-size:10px!important;line-height:1.4!important}
 html body .topbar .xovos-header-center{flex:0 1 auto!important;gap:6px!important;margin:0!important;transform:none!important}
 html body .topbar .social-links{gap:6px!important;justify-content:flex-start!important}
 html body .topbar .social-links a{width:28px!important;height:28px!important;min-height:28px!important;padding:4px!important}
 html body .topbar :is(.topbar-promo,.contact-items){display:none!important}
 html body .mainnav .container.nav-inner{display:flex!important;align-items:center!important;gap:9px!important;padding:7px 0!important;width:calc(100% - 24px)!important;min-height:56px!important}
 html body .mainnav .mobile-menu-toggle{flex:0 0 42px!important;width:42px!important;height:42px!important;min-height:42px!important;font-size:23px!important;border-radius:12px!important;padding:8px!important}
 html body .mainnav .nav-actions{flex:1!important;min-width:0!important;gap:7px!important;display:flex!important}
 html body .mainnav #liveDateTime{flex:1!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:6px 4px!important;min-height:42px!important;border-radius:14px!important;gap:1px 5px!important}
 html body .mainnav #liveDateTime :is(.live-date,.live-date-text){white-space:normal!important;font-size:10px!important;line-height:1.3!important}
 html body .mainnav #liveDateTime :is(.live-time,.live-time-text){font-size:12px!important;line-height:1.3!important;letter-spacing:1px!important}
 html body .mainnav :is(#themeToggle,.theme-toggle,.xovos-theme-btn){flex:0 0 38px!important;width:38px!important;min-width:38px!important;height:40px!important;padding:4px!important;font-size:21px!important}
 html body .hero{min-height:420px!important;height:auto!important;max-height:none!important}
 html body .hero .container.hero-content{padding:38px 0 44px!important}
 html body .hero-content h1{font-size:clamp(29px,7.4vw,38px)!important;line-height:1.18!important;max-width:22ch!important}
 html body .hero-content p{font-size:15px!important;line-height:1.65!important;margin-top:16px!important}
 html body .hero-actions{gap:10px!important;margin-top:22px!important}
 html body .hero-actions .hero-cta{font-size:14px!important;min-height:48px!important;padding:12px 14px!important;width:100%!important;white-space:normal!important}
 html body .section{padding-block:28px!important}
 html body :is(.card-grid,.quick-grid,.footer-grid,.video-grid,.news-archive-grid,.events-grid)>*{min-width:0!important}
 html body .footer{padding:28px 0 22px!important;border-radius:22px 22px 0 0!important}
 html body .footer-grid{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:22px 16px!important}
 html body .footer-col:first-child{grid-column:1/-1}
 html body .footer-col{padding:0!important;margin:0!important;min-width:0!important}
 html body .footer-brand{gap:10px!important}
 html body .footer-logo{width:40px!important;height:40px!important;flex-basis:40px!important}
 html body .footer-title{font-size:14px!important}
 html body .footer :is(p,a,li,.footer-text,.footer-card){font-size:12px!important;line-height:1.65!important;overflow-wrap:anywhere}
 html body .footer h3{font-size:15px!important;margin-bottom:12px!important}
 html body .footer-card{padding:14px!important}
 html body table:not(.sc-table){display:block;max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
 html body :is(.or-filter-grid,.filter-row,.dmed-toolbar){min-width:0!important;max-width:100%;flex-wrap:wrap}
 html body :is(.modal,.dialog,.modal-content){max-inline-size:calc(100vw - 24px);box-sizing:border-box}
 /* Appointments already provide a dedicated private chat. The global assistant
    must not cover its booking controls or activate a second microphone. */
 html body:is(.shifocall-page-body,.shifocall-admin-page-body) :is(.ai-assistant,.ai-chat-widget,.xv-voice-enable,#aiWidget,#aiChatWidget,#aiFab,#aiAssistant,#voiceAssistant,.ai-fab,.ai-orb,.assistant-fab,#xovos-ai42-root){display:none!important}
 #shifocall{padding:20px 0 30px}
 #shifocall .sc-topline{margin-bottom:24px;gap:12px}
 #shifocall .sc-wordmark{font-size:19px}
 #shifocall .sc-staff-link{font-size:11px;min-height:44px}
 #shifocall .sc-hero{grid-template-columns:minmax(0,1fr)!important;gap:24px;margin:0 0 28px}
 #shifocall .sc-hero h1{font-size:clamp(29px,7.3vw,38px)!important;line-height:1.16!important;letter-spacing:-1px!important;max-width:21ch;margin:13px 0 16px!important}
 #shifocall .sc-hero p{font-size:14px;line-height:1.7;margin-bottom:18px}
 #shifocall .sc-hero-cta{display:grid;grid-template-columns:minmax(0,1fr);gap:9px;margin-top:18px}
 #shifocall .sc-hero-cta .sc-btn{min-height:47px;font-size:13px;padding:12px}
 #shifocall .sc-hero-notes{gap:10px;margin-top:13px;font-size:10px}
 #shifocall .sc-how{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px;padding:19px 15px;border-radius:22px;background:linear-gradient(135deg,#e1f3ed,#e9e8f8)}
 #shifocall .sc-how-heading{grid-column:1/-1;font-size:9px;letter-spacing:1.4px}
 #shifocall .sc-step{display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:0;min-width:0}
 #shifocall .sc-step>b{width:28px;height:28px;font-size:10px}
 #shifocall .sc-step strong{font-size:11px;line-height:1.5;display:block}
 #shifocall .sc-step small{display:none}
 #shifocall .sc-how-note{grid-column:1/-1;margin:0;padding-top:11px;font-size:10px}
 #shifocall .sc-toolbar{padding-top:24px;gap:13px;align-items:stretch;flex-direction:column}
 #shifocall .sc-toolbar h2{font-size:24px!important;margin:0!important}
 #shifocall .sc-search{width:100%;flex:auto}
 #shifocall .sc-filters{display:flex;flex-wrap:nowrap;overflow-x:auto;max-width:100%;gap:7px;padding:4px 0 12px;scrollbar-width:thin}
 #shifocall .sc-filter{flex:none;min-height:40px;font-size:12px}
 #shifocall .sc-doctors{grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:14px}
 #shifocall .sc-doctor{padding:22px;border-radius:24px}
 #shifocall .sc-doctor .sc-btn{min-height:46px;font-size:13px}
 #shifocall .sc-empty{padding:26px 18px;min-height:0;font-size:13px}
 #shifocall .sc-disclaimer{margin-top:26px;padding-top:20px;font-size:11px;line-height:1.7}
 #shifocall .sc-notice{font-size:13px;padding:14px;margin:12px 0}
 #shifocall #scRetry{margin-bottom:16px;min-height:44px}
 .sc-dialog{position:fixed;inset:12px;width:min(560px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100% - 24px);margin:auto;padding:22px 18px;overflow:auto;overscroll-behavior:contain;box-sizing:border-box;border-radius:24px}
 .sc-dialog h2{font-size:22px!important;line-height:1.25!important}
 .sc-dialog .sc-grid2{grid-template-columns:minmax(0,1fr)}
 .sc-dialog .sc-close{min-width:40px;min-height:40px}
 .sc-dialog .sc-check{align-items:flex-start;font-size:12px;line-height:1.6}
 .sc-dialog .sc-check input{width:20px;min-width:20px;height:20px;min-height:20px;margin-top:3px}
 .sc-dialog .sc-btn{min-height:44px}
 .sc-range{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px;gap:7px;padding:12px 0;border-bottom:1px solid #dce7e3}
 .sc-range>select,.sc-range>input[type=date]{grid-column:1/-1}
 .sc-range :is(input,select){font-size:14px!important;padding:8px!important;min-height:42px}
 .sc-range .sc-close{width:36px!important;min-width:36px;min-height:42px}
 .sc-call .sc-control{min-width:36px;min-height:44px}
 .sc-call .sc-call-placeholder,.sc-call.chat-closed .sc-call-placeholder{padding:116px 20px 170px;gap:10px;overflow:auto;justify-content:center}
 .sc-call .sc-call-placeholder h2{font-size:21px!important}
 .sc-call .sc-call-placeholder .sc-btn{font-size:12px;min-height:42px}
 .sc-call .sc-call-person{max-width:calc(100% - 30px)}
 .sc-call .sc-chat-panel{inset:74px 8px 74px;width:calc(100% - 16px);padding:16px}
 .sc-call .sc-compose input{font-size:16px!important}
 .sc-thread-dialog .sc-compose :is(input,button){min-height:44px}
}
@media(max-width:380px){
 html body .topbar .brand{flex-basis:100%}
 html body .topbar .xovos-header-center{margin-left:49px!important}
 html body :is(.container,.sc-wrap){width:calc(100% - 24px)!important}
 #shifocall .sc-hero h1{font-size:29px!important}
 #scStaff .sc-stat{padding:17px;min-height:112px}#scStaff .sc-stat b{font-size:30px}
 #scStaff .sc-tabs .sc-filter{padding:10px 11px;font-size:11px;min-height:42px}
 .sc-call .sc-call-foot{gap:3px;padding-inline:6px;max-width:calc(100% - 16px)}
 .sc-call .sc-control{width:35px;min-width:35px;height:43px;padding:5px}
}
@media(max-width:900px) and (max-height:550px){
 .sc-call .sc-call-placeholder,.sc-call.chat-closed .sc-call-placeholder{padding:65px 20px 70px;gap:6px}.sc-call .sc-wait-icon{display:none}
 .sc-call .sc-chat-panel{inset:54px 8px 60px auto;width:min(380px,55%);padding:10px}
 .sc-call .sc-call-person{top:56px}.sc-call .sc-local-wrap{height:90px;width:72px}
}

/* Keep the assistant below clinical dialogs at every width. */
body:is(.shifocall-page-body,.shifocall-admin-page-body) #xovos-ai42-root{display:none!important}

.sc-more-doctors{grid-column:1/-1;justify-self:center;min-height:46px;margin:12px 0}
@media(max-width:900px){
 html body.docs-page-body .dd-direction-card,html body.docs-page-body .dd-direction-body{min-width:0!important;max-width:100%!important}
 html body.docs-page-body .dd-direction-card{grid-template-columns:32px minmax(0,1fr)!important;gap:10px!important;padding:14px!important}
 html body.docs-page-body .dd-direction-body h3,html body.docs-page-body .dd-direction-body p{white-space:normal!important;overflow-wrap:anywhere!important;max-width:100%!important}
 html body.docs-page-body .dd-toolbar{display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:12px!important;min-width:0!important}
 html body.docs-page-body .dd-toolbar>*{min-width:0!important;max-width:100%!important}
 html body.docs-page-body .dd-toolbar label{display:flex!important;flex-wrap:wrap!important;gap:8px}
 html body.docs-page-body .dd-toolbar select{width:100%!important;min-width:0!important}
 html body.docs-page-body .dd-tabs{display:flex!important;flex-wrap:wrap!important;max-width:100%!important;gap:7px!important}
 html body.docs-page-body .dd-tabs button{min-width:0!important;white-space:normal!important;flex:1 1 130px!important}
 html body.docs-page-body .dd-download-panel54{position:static!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box}
}
