/* QA1125 Roofing phone layout repair.
   Scope every override to the shared Roofing proposal shell so approved CRM
   headers and proposal workflows for other trades remain unchanged. */

@media (max-width:700px){
  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) > main > .topbar.handyman-topbar{
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr)!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-height:76px!important;
    padding:10px 14px!important;
    overflow:visible!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar > .menu-toggle{
    display:grid!important;
    grid-column:1!important;
    place-items:center!important;
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:0!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar > .topbar-page-title{
    display:none!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar > .topbar-actions{
    display:grid!important;
    grid-column:2!important;
    grid-template-columns:minmax(0,1fr) 48px!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    min-width:0!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-switcher,
  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-current{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-current{
    min-height:52px!important;
    padding:7px 10px!important;
    grid-template-columns:minmax(0,1fr) 20px!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-current span{
    font-size:9px!important;
    line-height:1.15!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-current strong{
    overflow:visible!important;
    font-size:13px!important;
    line-height:1.2!important;
    overflow-wrap:anywhere!important;
    text-overflow:clip!important;
    white-space:normal!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .workspace-current svg{
    width:18px!important;
    height:18px!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .topbar-actions > .signout{
    display:grid!important;
    place-items:center!important;
    width:48px!important;
    min-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:0!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .topbar-actions > .signout > span{
    display:none!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"]{
    display:flex!important;
    align-items:stretch!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    margin:10px 0 14px!important;
    padding:6px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-inline:contain!important;
    scroll-padding-inline:6px!important;
    scroll-snap-type:x proximity!important;
    scrollbar-width:none!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"]::-webkit-scrollbar{
    display:none!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button{
    position:relative!important;
    flex:0 0 38px!important;
    gap:0!important;
    width:38px!important;
    min-width:38px!important;
    min-height:56px!important;
    padding:6px 4px!important;
    overflow:hidden!important;
    scroll-snap-align:center!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button.active{
    flex:1 0 136px!important;
    justify-content:flex-start!important;
    gap:8px!important;
    width:auto!important;
    min-width:136px!important;
    padding:7px 10px!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button > svg,
  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button > i{
    display:none!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button > b{
    flex:0 0 28px!important;
    width:28px!important;
    min-width:28px!important;
    height:28px!important;
    margin:0!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button:not(.active) > span{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    margin:-1px!important;
    padding:0!important;
    overflow:hidden!important;
    clip:rect(0 0 0 0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button.active > span{
    position:static!important;
    width:auto!important;
    height:auto!important;
    min-width:0!important;
    margin:0!important;
    overflow:visible!important;
    clip:auto!important;
    clip-path:none!important;
    color:#fff!important;
    font-size:12px!important;
    line-height:1.15!important;
    text-align:left!important;
    white-space:normal!important;
  }

  /* Preparation & Repairs becomes a compact two-column field schedule on
     phones: the selectable task stays left and its editable quantity stays
     right. Existing buttons and inputs keep their runtime ownership. */
  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep{
    padding:14px 12px!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep > h4{
    margin:0 0 10px!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep > div{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:0!important;
    margin-top:0!important;
    overflow:hidden!important;
    border:1px solid #2b4a5f!important;
    border-radius:8px!important;
    background:#06131f!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item,
  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item.active{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) clamp(112px,34%,156px)!important;
    align-items:center!important;
    gap:10px!important;
    min-height:72px!important;
    margin:0!important;
    padding:9px 11px!important;
    overflow:visible!important;
    border:0!important;
    border-bottom:1px solid #243f52!important;
    border-radius:0!important;
    background:#071722!important;
    box-shadow:none!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item:last-child{
    border-bottom:0!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item:focus-within{
    background:#0a1d29!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > button{
    display:grid!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    min-height:48px!important;
    margin:0!important;
    padding:4px 0!important;
    border:0!important;
    background:transparent!important;
    text-align:left!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > button > svg{
    width:22px!important;
    height:22px!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > button > span{
    min-width:0!important;
    font-size:14px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > label{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    align-items:end!important;
    gap:4px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item > label > span{
    justify-self:end!important;
    min-height:0!important;
    color:#8ecaf0!important;
    font-size:10px!important;
    line-height:1.2!important;
    font-weight:800!important;
    letter-spacing:.03em!important;
    text-align:right!important;
    text-transform:uppercase!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item input{
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    padding:7px 9px!important;
    border-radius:6px!important;
    font-size:16px!important;
    line-height:1.2!important;
    text-align:right!important;
  }
}

@media (max-width:360px){
  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) > main > .topbar.handyman-topbar{
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:8px!important;
    padding-inline:10px!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar > .menu-toggle,
  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar .topbar-actions > .signout{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }

  .premium-app:has(.roofing-shared-proposal-shell .hgc-rc-page) .handyman-topbar > .topbar-actions{
    grid-template-columns:minmax(0,1fr) 44px!important;
    gap:8px!important;
  }

  .roofing-shared-proposal-shell .hgc-flow-nav.hgc-home-repair-five-step[aria-label="Roofing estimate steps"] > button.active{
    flex-basis:124px!important;
    min-width:124px!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep{
    padding-inline:9px!important;
  }

  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item,
  .roofing-shared-proposal-shell .hgc-estimator-page.hgc-rc-page .hgc-rc-prep-item.active{
    grid-template-columns:minmax(0,1fr) 102px!important;
    gap:8px!important;
    padding:8px 9px!important;
  }
}
