/* Phone layout for Homestead. Each portal retains its own navigation and scroll container. */
@media screen and (max-width:767px){
 :root{
  --homestead-phone-gutter:clamp(10px,3vw,16px);
  --homestead-phone-gap:10px;
  --homestead-phone-pink:#AF2447;
 }
 html[data-theme] #app#app.command-center-view .gm-header,
 html[data-theme] #owner-app .owner-top,
 html[data-theme] .bb-staff-hub.bb-staff-workspace .bb-hub-header{
  box-sizing:border-box;
  min-height:60px!important;
  margin-inline:0;
  padding:8px var(--homestead-phone-gutter)!important;
  align-items:center;
  gap:8px;
  background:var(--homestead-phone-pink)!important;
  border-bottom-color:#8F1C3D!important;
  color:#fff;
 }
 html[data-theme="light"] #app#app.command-center-view .gm-chat-wrap:has(.bb-gm-home)>.gm-header{
  min-height:60px!important;
  padding:8px var(--homestead-phone-gutter)!important;
 }
 html[data-theme] #app#app.command-center-view .gm-header .gm-header-copy,
 html[data-theme] #owner-app .owner-top-brand,
 html[data-theme] .bb-staff-workspace :is(.bb-hub-brand,.bb-hub-brand-text){
  min-width:0;
  overflow-wrap:anywhere;
 }
 html[data-theme] #app#app.command-center-view .gm-header h1,
 html[data-theme="light"] #app#app.command-center-view .gm-chat-wrap:has(.bb-gm-home)>.gm-header h1,
 html[data-theme] #owner-app .owner-top h1,
 html[data-theme] .bb-staff-hub.bb-staff-workspace .bb-hub-header .bb-hub-brand-text h1{
  font-size:clamp(21px,5.8vw,27px)!important;
  line-height:1.13!important;
  margin-block:2px 0!important;
  white-space:normal;
  color:#fff!important;
 }
 html[data-theme] .bb-staff-hub.bb-staff-workspace .bb-hub-header
 :is(.bb-hub-breadcrumb,.bb-hub-brand-text small,.bb-hub-preview-inline){
  color:#fff!important;
 }
 html[data-theme] .bb-staff-hub.bb-staff-workspace .bb-hub-header .bb-hub-brand-mark{
  width:34px;height:34px;flex-basis:34px;
  color:#fff;background:#FFFFFF20;border-color:#FFFFFF50;
 }
 html[data-theme] .bb-staff-hub.bb-staff-workspace .bb-hub-header .bb-hub-bell{
  background:transparent;border-color:transparent;
 }
 html[data-theme] #owner-app .owner-top-actions{flex:none}
 html[data-theme] #app#app.command-center-view .gm-header-actions,
 html[data-theme] .bb-staff-workspace .bb-staff-header-actions{flex:none}
 html[data-theme] #app#app.command-center-view .gm-location-path{flex-wrap:wrap;row-gap:2px}

 html[data-theme] #app#app.command-center-view .gm-mobile-bottom,
 html[data-theme] #owner-app .owner-bottom-bar,
 html[data-theme] .bb-staff-workspace .bb-hub-bottom{
  box-sizing:border-box;
  padding-inline:max(4px,env(safe-area-inset-left)) max(4px,env(safe-area-inset-right));
  background:var(--homestead-phone-pink)!important;
 }
 html[data-theme] #app#app.command-center-view .gm-mobile-bottom,
 html[data-theme] .bb-staff-workspace .bb-hub-bottom{
  grid-template-columns:repeat(4,minmax(0,1fr));
 }
 html[data-theme] #owner-app .owner-bottom-bar>nav{min-width:0}
 html[data-theme] #owner-app .owner-bottom-bar button,
 html[data-theme] .bb-staff-workspace .bb-hub-bottom button{min-width:0}

 html[data-theme] #app#app.command-center-view .gm-work-area:not(.gm-sheet-workspace,.gm-ownership-meeting-workspace),
 html[data-theme] #owner-app .owner-content:not(.owner-content--porch,.owner-content--sheet),
 html[data-theme] .bb-staff-workspace .bb-hub-scroll{
  box-sizing:border-box;
  min-width:0;
  padding-inline:var(--homestead-phone-gutter)!important;
 }
 html[data-theme] #owner-app .owner-content:not(.owner-content--porch,.owner-content--sheet){
  gap:var(--homestead-phone-gap);
  padding-top:var(--homestead-phone-gap);
 }
 html[data-theme] #app#app.command-center-view .bb-gm-home{gap:var(--homestead-phone-gap)}
 html[data-theme] #app#app.command-center-view .bb-gm-home .bb-homestead-card{padding:12px}
 html[data-theme] #app#app.command-center-view .bb-gm-home .bb-homestead-card h2{font-size:22px}
 html[data-theme] #app#app.command-center-view .bb-gm-home .bb-homestead-card p{font-size:14px}
 html[data-theme] .bb-staff-workspace .bb-hub-next-shift{margin-top:12px}
 html[data-theme] .bb-staff-workspace .bb-hub-attention-row{min-height:56px;padding:10px 12px}
 :is(#app,#owner-app) .bb-front-porch-switch{
  box-sizing:border-box;max-width:100%;flex-wrap:wrap;
 }
 :is(#app,#owner-app) .bb-front-porch-switch button{
  min-width:0;min-height:40px;white-space:normal;
 }
 :is(#app,#owner-app,#staff-app) :is(.owner-dialog,.od-dialog,.bb-settings-popover){
  box-sizing:border-box;
  max-width:calc(100% - 2 * var(--homestead-phone-gutter));
  max-height:calc(100dvh - 2 * var(--homestead-phone-gutter));
 }

 .homestead-partner-page>header{
  background:var(--homestead-phone-pink);
  padding:9px var(--homestead-phone-gutter);
  gap:8px;
 }
 .homestead-partner-page>main{
  margin:0 auto;
  padding:var(--homestead-phone-gutter) var(--homestead-phone-gutter) calc(16px + env(safe-area-inset-bottom));
 }
 .homestead-partner-page .card{min-width:0;padding:12px;margin-block:10px;border-radius:12px}
 .homestead-partner-page :is(input:not([type=checkbox],[type=radio]),select,textarea){font-size:16px;max-width:100%}
 .homestead-partner-page :is(.vendor-front-porch-tabs,.transition-porch-tabs)>button{
  min-width:0;min-height:44px;white-space:normal;
 }
 .homestead-partner-page #transitionSharedDiscovery{padding:0}
}

@media screen and (max-width:380px){
 html[data-theme] #owner-app .owner-top .owner-reading-control button{min-width:29px;padding-inline:4px}
 html[data-theme] .bb-staff-workspace .bb-hub-header .bb-hub-preview-inline{display:none}
 .homestead-partner-page .row>*{min-width:0;max-width:100%}
}

/* These wrappers restore the original desktop arrangement. */
.owner-meeting-desktop-actions{display:contents}
.owner-meeting-phone-tools{display:none}

@media screen and (max-width:767px){
 #app .sc-gm-private-meeting .sc-porch-transition-head{gap:6px;margin-bottom:8px}
 #app .sc-gm-private-meeting .sc-porch-transition-head h2{font-size:20px;margin:0}
 #app .sc-gm-private-meeting .sc-porch-transition-head p{font-size:12px;line-height:1.4;margin:4px 0}
 #app .sc-gm-private-meeting .owner-head{margin:0 0 6px}
 #app .sc-gm-private-meeting .owner-head p{font-size:12px;margin:0}
 #app .sc-gm-private-meeting :is(.owner-meeting-desktop-actions,.owner-work>.owner-nav){display:none}
 #app .sc-gm-private-meeting .owner-meeting-phone-tools{display:block;margin-bottom:8px}
 #app .sc-gm-private-meeting .owner-meeting-phone-tools>summary{
  display:list-item;min-height:42px;box-sizing:border-box;padding:10px;
  border:1px solid var(--theme-border);border-radius:8px;cursor:pointer;font-weight:700;
 }
 #app .sc-gm-private-meeting .owner-meeting-phone-tools .owner-nav,
 #app .sc-gm-private-meeting .owner-meeting-phone-actions{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0;
 }
 #app .sc-gm-private-meeting .owner-meeting-phone-tools button{
  min-width:0;white-space:normal;min-height:44px;padding:6px;font-size:12px;
 }
 #app .sc-gm-private-meeting .owner-content select{max-width:100%;font-size:16px!important}
 :is(#owner-app,#app,.homestead-partner-page) .od-dialog[open]{
  box-sizing:border-box;
  position:fixed;
  inset:calc(var(--od-visible-top,0px) + 8px) 0 auto;
  width:calc(100% - 16px);
  max-height:calc(var(--od-visible-height,100dvh) - 16px);
  margin:0 auto;padding:12px;
  overflow-y:auto;overscroll-behavior:contain;
 }
 :is(#owner-app,#app,.homestead-partner-page) .od-dialog :is(input,textarea,select){
  box-sizing:border-box;font-size:16px!important;max-width:100%;
 }
 :is(#owner-app,#app,.homestead-partner-page) .od-dialog textarea{min-height:76px;height:88px}
 :is(#owner-app,#app,.homestead-partner-page) .od-dialog .od-dialog-actions{
  position:static;margin:10px 0 0;padding:8px 0 0;
 }
}
