/* Next Big Domain 0.65.0
   Final hero fidelity + full-bleed application shell.
   - Hero uses the approved dashboard crop at full contrast, without washing out its dark rail.
   - Seller/buyer workspaces become edge-to-edge software surfaces beneath the site header.
   - The application sidebar has no duplicate NBD logo. Its navigation stays in view while content scrolls.
*/

/* --------------------------------------------------------------------------
   HOMEPAGE HERO — approved composition, no dashboard wash-out
   -------------------------------------------------------------------------- */
@media (min-width:1121px){
  .nbd-ref-hero{
    min-height:650px!important;
    background:#fff!important;
    border-bottom:1px solid #e8eef6!important;
  }
  /* The approved crop already contains the office scene, so do not lay a second
     competing photograph behind it on desktop. */
  .nbd-ref-hero-bg{
    background:#fff!important;
    opacity:1!important;
  }
  .nbd-ref-hero-grid{
    min-height:650px!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    align-items:center!important;
    gap:0!important;
    padding:48px 0 34px!important;
  }
  .nbd-ref-hero-copy{
    position:relative!important;
    z-index:4!important;
    width:min(47%,710px)!important;
    max-width:710px!important;
    padding:4px 0 0 4px!important;
  }
  .nbd-ref-hero h1{
    max-width:700px!important;
    font-size:clamp(56px,4.1vw,72px)!important;
    line-height:1.04!important;
  }
  .nbd-ref-hero-copy>p{max-width:680px!important}
  .nbd-ref-dashboard-shot--reference{
    position:absolute!important;
    z-index:2!important;
    top:0!important;
    right:0!important;
    bottom:auto!important;
    width:min(56vw,940px)!important;
    height:auto!important;
    margin:0!important;
    overflow:visible!important;
    pointer-events:none!important;
  }
  .nbd-ref-hero-product-image{
    display:block!important;
    width:100%!important;
    max-width:940px!important;
    height:auto!important;
    margin:0 0 0 auto!important;
    object-fit:contain!important;
    object-position:right top!important;
    transform:none!important;
    filter:none!important;
    -webkit-mask-image:none!important;
    mask-image:none!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  /* Only soften the empty office edge of the crop. This ends before the dark
     product sidebar starts, so the interface remains fully visible. */
  .nbd-ref-dashboard-shot--reference::before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    z-index:3!important;
    inset:0 auto 0 0!important;
    width:42px!important;
    background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.72) 34%,rgba(255,255,255,0) 100%)!important;
    pointer-events:none!important;
  }
}

@media (min-width:1121px) and (max-width:1500px){
  .nbd-ref-hero{min-height:620px!important}
  .nbd-ref-hero-grid{min-height:620px!important;padding-top:42px!important}
  .nbd-ref-hero-copy{width:min(47%,650px)!important;max-width:650px!important}
  .nbd-ref-hero h1{font-size:clamp(52px,4.45vw,66px)!important}
  .nbd-ref-dashboard-shot--reference{width:min(58vw,900px)!important}
}

/* Tablet/mobile use a contained full image, never a cropped or stretched one. */
@media (max-width:1120px){
  .nbd-ref-dashboard-shot--reference{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;overflow:visible!important}
  .nbd-ref-dashboard-shot--reference::before{display:none!important}
  .nbd-ref-hero-product-image{width:min(100%,940px)!important;max-width:940px!important;height:auto!important;object-fit:contain!important;-webkit-mask-image:none!important;mask-image:none!important;filter:none!important}
}

/* --------------------------------------------------------------------------
   WORKSPACE — full bleed software shell with persistent nav
   -------------------------------------------------------------------------- */
body .nbdm-dashboard.nbdm-workspace,
body .nbdm-page.nbdm-workspace{
  width:100vw!important;
  max-width:100vw!important;
  margin:0 0 0 calc(50% - 50vw)!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:#f6f8fb!important;
  box-shadow:none!important;
  overflow:visible!important;
}

/* Keep small status/notice bars readable without reintroducing an outer app gutter. */
body .nbdm-workspace > :is(.nbdm-notice,.nbdm-success,.nbdm-error,.nbdm-job-progress){
  width:min(1440px,calc(100% - 40px))!important;
  margin:14px auto!important;
}

@media (min-width:1121px){
  body .nbdm-workspace .nbdm-workspace-layout{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100dvh - 106px)!important;
    margin:0!important;
    display:grid!important;
    grid-template-columns:276px minmax(0,1fr)!important;
    align-items:stretch!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    background:#f6f8fb!important;
    box-shadow:none!important;
  }
  body .nbdm-workspace .nbdm-workspace-sidebar{
    position:relative!important;
    top:auto!important;
    align-self:stretch!important;
    min-height:100%!important;
    height:auto!important;
    max-height:none!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    background:linear-gradient(180deg,#071d35 0%,#071a30 100%)!important;
    box-shadow:none!important;
  }
  body .nbdm-workspace .nbdm-workspace-sidebar-inner{
    position:sticky!important;
    top:calc(var(--wp-admin--admin-bar--height,0px) + 10px)!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:auto!important;
    max-height:calc(100dvh - var(--wp-admin--admin-bar--height,0px) - 20px)!important;
    margin:0!important;
    padding:20px 16px 16px!important;
    overflow:hidden!important;
  }
  /* 0.65 deliberately removes the duplicate brand from the application rail. */
  body .nbdm-workspace .nbdm-app-brand{display:none!important}
  body .nbdm-workspace .nbdm-workspace-nav{
    flex:1 1 auto!important;
    min-height:0!important;
    display:grid!important;
    align-content:start!important;
    gap:13px!important;
    padding:0 2px 8px 0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    scrollbar-width:thin!important;
    scrollbar-color:rgba(164,193,220,.28) transparent!important;
  }
  body .nbdm-workspace .nbdm-workspace-nav::-webkit-scrollbar{width:4px!important}
  body .nbdm-workspace .nbdm-workspace-nav::-webkit-scrollbar-track{background:transparent!important}
  body .nbdm-workspace .nbdm-workspace-nav::-webkit-scrollbar-thumb{background:rgba(164,193,220,.28)!important;border-radius:999px!important}
  body .nbdm-workspace .nbdm-nav-group{gap:3px!important}
  body .nbdm-workspace .nbdm-nav-group h2{
    margin:0 10px 5px!important;
    color:#7895b3!important;
    font-size:8.5px!important;
    font-weight:850!important;
    letter-spacing:.15em!important;
    line-height:1.2!important;
    text-transform:uppercase!important;
  }
  body .nbdm-workspace .nbdm-workspace-nav a{
    min-height:42px!important;
    padding:7px 11px!important;
    gap:11px!important;
    border-radius:9px!important;
    font-size:13px!important;
    line-height:1.15!important;
  }
  body .nbdm-workspace .nbdm-workspace-nav a svg{
    width:17px!important;
    height:17px!important;
    flex:0 0 17px!important;
  }
  body .nbdm-workspace .nbdm-workspace-content{
    min-width:0!important;
    min-height:calc(100dvh - 106px)!important;
    padding:0 30px 48px!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    background:#f6f8fb!important;
    box-shadow:none!important;
  }
  body .nbdm-workspace .nbdm-app-toolbar{
    position:sticky!important;
    z-index:20!important;
    top:var(--wp-admin--admin-bar--height,0px)!important;
    margin:0 -30px!important;
    padding:13px 30px!important;
    border-radius:0!important;
    box-shadow:0 1px 0 #dfe8f1!important;
  }
  body .nbdm-workspace .nbdm-context-header{
    margin:0 -30px 26px!important;
    padding-left:30px!important;
    padding-right:30px!important;
  }
}

/* Short laptops: fit the full menu naturally before scrolling the rail. */
@media (min-width:1121px) and (max-height:820px){
  body .nbdm-workspace .nbdm-workspace-sidebar-inner{padding-top:12px!important;padding-bottom:10px!important}
  body .nbdm-workspace .nbdm-workspace-nav{gap:7px!important}
  body .nbdm-workspace .nbdm-nav-group h2{margin-bottom:2px!important;font-size:7.5px!important}
  body .nbdm-workspace .nbdm-workspace-nav a{min-height:35px!important;padding:5px 10px!important;font-size:12px!important}
  body .nbdm-workspace .nbdm-workspace-nav a svg{width:15px!important;height:15px!important;flex-basis:15px!important}
}

@media (min-width:1121px) and (max-height:680px){
  body .nbdm-workspace .nbdm-workspace-sidebar-inner{padding-top:8px!important;padding-bottom:7px!important}
  body .nbdm-workspace .nbdm-workspace-nav{gap:3px!important}
  body .nbdm-workspace .nbdm-nav-group h2{margin-bottom:1px!important;font-size:7px!important}
  body .nbdm-workspace .nbdm-workspace-nav a{min-height:31px!important;padding:4px 9px!important;font-size:11px!important}
}

/* Tablet/mobile remain purpose-built responsive UI, not a squashed desktop app. */
@media (max-width:1120px){
  body .nbdm-dashboard.nbdm-workspace,
  body .nbdm-page.nbdm-workspace{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
  body .nbdm-workspace .nbdm-workspace-layout{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }
  body .nbdm-workspace .nbdm-workspace-sidebar{border-radius:0!important}
  body .nbdm-workspace .nbdm-workspace-sidebar-inner{position:static!important;top:auto!important;max-height:none!important;padding:0!important;overflow:visible!important}
  body .nbdm-workspace .nbdm-app-brand{display:none!important}
  body .nbdm-workspace .nbdm-workspace-nav{overflow:visible!important}
  body .nbdm-workspace .nbdm-workspace-content{border-radius:0!important}
}
