/* Device-specific presentation. Keep one set of forms, IDs and event handlers.
   900px matches Business navigation; POS needs 1100px for a usable till. */
@media screen and (min-width:901px){
  html body.personal-app.approved-home-v7.approved-home-v8.wenapay-home-v9>.shell{
    box-sizing:border-box;width:calc(100% - 64px)!important;max-width:1200px!important;
    min-height:100dvh!important;padding:28px 32px 40px 224px!important;
    border:0!important;box-shadow:none!important;
  }
  html body.personal-app.wenapay-home-v9 #home:not([hidden]){
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
    align-items:start;gap:24px;
  }
  html body.personal-app.wenapay-home-v9 #home> :is(.onboarding-card,.personal-welcome,.wp-wallet-switcher,.security-banner,.content-grid,.page-error,.pilot-note){grid-column:1/-1;min-width:0}
  html body.personal-app.wenapay-home-v9 :is(.wallet-carousel-shell,.personal-action-section){min-width:0;margin:0!important}
  html body.personal-app.wenapay-home-v9 .personal-action-grid{
    max-width:none!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;
  }
  html body.personal-app.wenapay-home-v9 .personal-action-section{grid-column:1/-1}
  html body.personal-app.wenapay-home-v9 .security-banner{
    min-height:160px!important;grid-template-columns:minmax(0,1fr) 180px!important;
    align-items:center!important;padding:24px!important;
  }
  html body.personal-app.wenapay-home-v9 .security-copy{max-width:none!important}
  html body.personal-app.wenapay-home-v9 .security-banner::before{top:20px!important;right:30px!important}
  html body.personal-app.wenapay-home-v9 .security-banner>b{justify-self:end!important;align-self:end!important}
  html body.personal-app.wenapay-home-v9 .content-grid>.requests-panel:not([hidden]){display:block!important}
  html body.personal-app.wenapay-home-v9 .content-grid{
    width:100%;max-width:none!important;display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px;
  }
  html body.personal-app.wenapay-home-v9 .content-grid>.panel{min-width:0}
  /* Reuse the same navigation nodes so Pay and unread indicators keep working. */
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav{
    left:max(32px,calc((100vw - 1200px)/2))!important;right:auto!important;
    top:28px!important;bottom:auto!important;transform:none!important;
    width:184px!important;max-width:184px!important;height:auto!important;
    min-height:0!important;grid-template-columns:minmax(0,1fr)!important;
    align-content:start!important;padding:12px!important;border-radius:20px!important;
    max-height:calc(100dvh - 56px);overflow-y:auto!important;
  }
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .approved-nav-item{
    flex-direction:row!important;justify-content:flex-start!important;
    gap:12px!important;height:52px!important;padding:10px 12px!important;
  }
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .approved-nav-item>span:last-child{font-size:14px!important;line-height:1.3!important}
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .approved-nav-pay{transform:none!important}
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .approved-nav-pay-icon{
    width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;
    border-radius:10px!important;box-shadow:none!important;
  }
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .is-active::after{display:none!important}
  html body.personal-app.wenapay-home-v9 .wp-shared-bottom-nav .is-active{background:rgba(255,123,50,.12)!important}
  /* Desktop actions open centred dialogs instead of a phone-sized bottom sheet. */
  html body.personal-app.wenapay-home-v9 .action-sheet{
    top:50%!important;bottom:auto!important;left:50%!important;right:auto!important;
    transform:translate(-50%,-50%)!important;width:min(560px,calc(100vw - 64px))!important;
    max-height:calc(100dvh - 64px)!important;overflow-y:auto;border-radius:24px!important;
  }
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) .merchant-product-shell{grid-template-columns:214px minmax(0,1fr)!important;overflow:visible}
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) .merchant-desktop-sidebar{
    display:flex!important;position:sticky;top:16px;align-self:start;
    max-height:calc(100dvh - 32px);overflow-y:auto;
  }
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) .merchant-trading-nav{display:none!important}
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) main.shell{box-sizing:border-box;padding-bottom:32px!important}
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) :is(.merchant-child-main,.merchant-dashboard-main){min-width:0;padding-bottom:32px!important}
  html body[data-wp-screen="BUSINESS-HOME-V7"] .metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  html body[data-wp-screen="BUSINESS-CHILD-V7"] .table-wrap{max-width:100%;overflow-x:auto}
}
@media screen and (min-width:1101px){
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-app{grid-template-columns:184px minmax(0,1fr) 320px}
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-main{padding-bottom:32px!important}
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-sidebar{overflow-y:auto;max-height:100dvh}
  html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar{display:none!important}
  html body[data-wp-screen="BUSINESS-POS-V9"] .catalogue-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr);gap:12px}
}
@media screen and (max-width:1100px){
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-app{display:block!important}
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-sidebar{display:none!important}
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-cart{
    position:fixed;inset:0 0 0 auto;width:min(390px,100%);height:100dvh;
    max-height:100dvh;transform:translateX(105%);z-index:100;
  }
  html body[data-wp-screen="BUSINESS-POS-V9"].cart-open .pos-cart{transform:translateX(0)}
  html body[data-wp-screen="BUSINESS-POS-V9"] .cart-close{display:grid;place-items:center;min-width:44px;min-height:44px}
  html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar{display:grid!important}
}
@media screen and (min-width:1440px){
  html body[data-wp-screen="BUSINESS-POS-V9"] .pos-app{grid-template-columns:204px minmax(0,1fr) 350px}
  html body[data-wp-screen="BUSINESS-HOME-V7"] .metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
/* The original fixed basket bar was limited to <=980px. Supply its tablet
   geometry too, otherwise the dock covers the in-flow View basket button. */
@media screen and (min-width:981px) and (max-width:1100px){
  html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar{
    position:fixed;left:18px;right:18px;
    bottom:calc(var(--merchant-nav-height) + env(safe-area-inset-bottom))!important;
    z-index:81;grid-template-columns:44px minmax(0,1fr) 1px minmax(145px,.8fr);
    align-items:center;gap:16px;min-height:76px;padding:12px 18px;
    border:1px solid var(--wp-line);border-radius:20px;
    background:var(--wp-panel);color:var(--wp-ink);box-shadow:0 12px 30px #0003;
  }
  html body[data-wp-screen="BUSINESS-POS-V9"] .mobile-cart-bar button{
    min-height:48px;border:0;border-radius:14px;background:#ff7b32;color:#19100a;
  }
}
@media screen and (max-width:900px){
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) .merchant-desktop-sidebar{display:none!important}
  html body:is([data-wp-screen="BUSINESS-HOME-V7"],[data-wp-screen="BUSINESS-CHILD-V7"]) main.shell{padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}
}
