/* Theo Properties RC1.0.11.20.24 — Orientation Adaptation & Tablet Mobile-Menu Parity
   Responsive shell only. No route, auth, workspace, business-logic or backend changes. */

/* Tablet portrait and compact phone landscape use the compact workspace shell. */
@media (orientation:portrait) and (min-width:701px) and (max-width:1024px),
       (orientation:landscape) and (max-width:1024px) and (max-height:600px){
  body.signed-mode .app{
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    min-width:0!important;
  }
  body.signed-mode .sidebar{
    display:none!important;
  }
  body.signed-mode .main{
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body.signed-mode .topbar{
    position:sticky!important;
    top:0!important;
    z-index:64!important;
    height:60px!important;
    padding:0 16px!important;
  }
  body.signed-mode .topbar .crumb{
    display:none!important;
  }
  body.signed-mode .content{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    padding-left:18px!important;
    padding-right:18px!important;
    padding-bottom:calc(96px + env(safe-area-inset-bottom))!important;
  }
  body.signed-mode #mobile-nav.mobile-nav{
    display:flex!important;
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:min(calc(100vw - 28px),720px)!important;
    min-height:64px!important;
    height:auto!important;
    padding:6px!important;
    gap:4px!important;
    justify-content:stretch!important;
    border:1px solid rgba(207,218,223,.94)!important;
    border-radius:18px!important;
    background:rgba(250,252,252,.96)!important;
    -webkit-backdrop-filter:blur(22px) saturate(1.08)!important;
    backdrop-filter:blur(22px) saturate(1.08)!important;
    box-shadow:0 14px 36px rgba(14,35,52,.16),0 2px 7px rgba(14,35,52,.07)!important;
    z-index:86!important;
    overflow:visible!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button{
    flex:1 1 0!important;
    min-width:0!important;
    max-width:none!important;
    min-height:50px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    padding:5px 4px!important;
    border:0!important;
    border-radius:12px!important;
    background:transparent!important;
    color:#758894!important;
    font-size:9px!important;
    font-weight:850!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button svg{
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button.active{
    background:#eef4f5!important;
    color:#173f58!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button.active::after{
    content:none!important;
  }
}

/* iPad/tablet portrait: keep content tablet-sized, but use the compact navigation shell. */
@media (orientation:portrait) and (min-width:701px) and (max-width:1024px){
  body.signed-mode .content{
    padding-top:22px!important;
  }
  body.signed-mode #mobile-brand.official-header-logo{
    width:176px!important;
    height:46px!important;
  }
  body.signed-mode .official-header-logo img{
    width:198px!important;
    height:auto!important;
    transform:translate(-11px,-9px)!important;
  }
}

/* Compact phone landscape: recalculate the Explore composition after rotation. */
@media (orientation:landscape) and (max-width:1024px) and (max-height:600px){
  body.signed-mode .content{
    padding-top:12px!important;
    padding-left:14px!important;
    padding-right:14px!important;
    padding-bottom:82px!important;
  }
  body.signed-mode .topbar{
    height:52px!important;
    padding:0 12px!important;
  }
  body.signed-mode #mobile-brand.official-header-logo{
    width:142px!important;
    height:39px!important;
  }
  body.signed-mode .official-header-logo img{
    width:160px!important;
    height:auto!important;
    transform:translate(-9px,-7px)!important;
  }
  body.theo-app #explore .premium-marketplace-hero{
    width:calc(100vw - 20px)!important;
    min-height:0!important;
    margin:10px auto 0!important;
    grid-template-columns:minmax(0,1.08fr) minmax(300px,.92fr)!important;
    border-radius:14px!important;
  }
  body.theo-app #explore .marketplace-hero-copy{
    padding:24px 24px 20px!important;
  }
  body.theo-app #explore .premium-marketplace-hero h1,
  body.theo-app #explore #marketplace-title{
    font-size:clamp(30px,5vw,44px)!important;
    line-height:1!important;
  }
  body.theo-app #explore .hero-lead{
    margin:12px 0 16px!important;
    font-size:13px!important;
    line-height:1.42!important;
  }
  body.theo-app #explore .marketplace-hero-visual{
    height:auto!important;
    min-height:340px!important;
  }
  body.theo-app #explore .hero-search-card{
    padding:12px!important;
  }
  body.theo-app #explore .hero-search-card .public-search input,
  body.theo-app #explore .hero-search-card .public-search select,
  body.theo-app #explore .hero-search-card .rent-range-trigger,
  body.theo-app #explore .location-search-shell,
  body.theo-app #explore .hero-search-submit{
    min-height:44px!important;
    height:44px!important;
  }
  body.signed-mode #mobile-nav.mobile-nav{
    width:min(calc(100vw - 24px),680px)!important;
    min-height:56px!important;
    bottom:6px!important;
    border-radius:15px!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button{
    min-height:44px!important;
    font-size:8px!important;
    padding:3px!important;
  }
  body.signed-mode #mobile-nav.mobile-nav button svg{
    width:18px!important;
    height:18px!important;
    flex-basis:18px!important;
  }
}

/* Restore the desktop/sidebar shell as soon as there is genuine landscape room. */
@media (orientation:landscape) and (min-width:1025px),
       (orientation:landscape) and (min-height:601px) and (min-width:901px){
  body.signed-mode #mobile-nav.mobile-nav{
    display:none!important;
  }
}
