/* JR_LISTING_HOME_CHROME_v1 — e18 .top header + browse dropdown on listing pages */

:root{
  --jr-listing-orange:#ff9709;
  --jr-listing-orange2:#ffb44a;
  --jr-listing-text:#f3f5f6;
  --jr-listing-line:#24343f;
  --jr-listing-line2:#2b414e;
  --jr-listing-safe-top:env(safe-area-inset-top,0px);
}

/* --- Shared e18 top header on listing --- */
body.jr-listing-v2-page header.top.jr-listing-e18-top,
body.jr-listing-v2-page .jr-listing-e18-top.top{
  height:68px;
  padding:calc(10px + var(--jr-listing-safe-top)) 28px 10px;
  display:grid;
  grid-template-columns:235px minmax(200px,1fr) auto;
  gap:22px;
  align-items:center;
  background:#030709 !important;
  border-bottom:1px solid #17232b !important;
  position:sticky;
  top:0;
  z-index:100;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  margin:0;
  color:var(--jr-listing-text);
}
body.jr-listing-v2-page .jr-listing-e18-top .brand{
  display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-size:22px;font-weight:800;min-width:0;
}
body.jr-listing-v2-page .jr-listing-e18-top .brand img,
body.jr-listing-v2-page .jr-listing-e18-top .brand-mark{
  width:46px;height:46px;object-fit:contain;flex:0 0 auto;
}
body.jr-listing-v2-page .jr-listing-e18-top .search{
  height:44px;border:1px solid var(--jr-listing-line);background:#101a22;border-radius:14px;
  display:flex;align-items:center;gap:10px;padding:0 14px;margin:0;min-width:0;
}
body.jr-listing-v2-page .jr-listing-e18-top .search input{
  width:100%;border:0;background:transparent;outline:0;color:var(--jr-listing-text);font:inherit;min-width:0;
}
body.jr-listing-v2-page .jr-listing-e18-top .search [data-icon]{display:inline-flex;color:#8ea0ad;flex:0 0 auto}
body.jr-listing-v2-page .jr-listing-e18-top .top-actions .post{
  height:44px;padding:0 18px;border:0;border-radius:13px;
  background:linear-gradient(180deg,var(--jr-listing-orange2),var(--jr-listing-orange));
  color:#111;font-weight:800;text-decoration:none;display:inline-flex;align-items:center;gap:8px;
}
body.jr-listing-v2-page .jr-listing-e18-top .icon-btn{
  width:44px;height:44px;border:0;background:transparent;display:grid;place-items:center;color:var(--jr-listing-text);position:relative;
}

@media (max-width:900px){
  body.jr-listing-v2-page header.top.jr-listing-e18-top,
  body.jr-listing-v2-page .jr-listing-e18-top.top{
    height:auto;min-height:64px;
    padding:calc(8px + var(--jr-listing-safe-top)) 8px 8px;
    grid-template-columns:44px 1fr auto;gap:8px;
    display:grid !important; /* override legacy #siteHeader hide rules */
  }
  body.jr-listing-v2-page .jr-listing-e18-top .brand span{display:none}
  body.jr-listing-v2-page .jr-listing-e18-top .brand img{width:40px;height:40px}
}

/* Never hide the new e18 listing header (legacy rules targeted #siteHeader / header.header only) */
@media (max-device-width:820px),(max-width:700px){
  body.jr-listing-v2-page header.top.jr-listing-e18-top,
  body.jr-listing-v2-page .jr-listing-e18-top{
    display:grid !important;
    visibility:visible !important;
    opacity:1 !important;
    pointer-events:auto !important;
    transform:none !important;
  }
}

/* Context row: back only on mobile — brand lives in header.top */
body.jr-listing-v2-page .jr2-mobile-detail-brand,
body.jr-listing-v2-page .jr2-context-balance{display:none !important}

@media (max-width:900px){
  html[data-jr-theme] body.jr-listing-v2-page .jr2-context-row,
  body.jr-listing-v2-page .jr2-context-row{
    display:flex !important;
    grid-template-columns:none !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;
    min-height:48px !important;
    padding:8px 4px !important;
  }
  html[data-jr-theme] body.jr-listing-v2-page .jr2-context-row .jr2-back-results,
  body.jr-listing-v2-page .jr2-context-row .jr2-back-results{
    width:auto !important;
    min-width:0 !important;
    max-width:100% !important;
    padding:7px 12px !important;
    font-size:13px !important;
    justify-content:flex-start !important;
  }
  html[data-jr-theme] body.jr-listing-v2-page .jr2-context-row .jr2-back-label,
  body.jr-listing-v2-page .jr2-context-row .jr2-back-label{
    display:inline !important;
  }
  body.jr-listing-v2-page .jr2-context-row .jr2-route-line,
  body.jr-listing-v2-page .jr2-context-row .jr2-top-intel{
    display:none !important;
  }
}

/* --- Category browse dropdown --- */
.jr2-cat-dd{position:relative;display:inline-flex;align-items:center;max-width:100%}
.jr2-cat-dd__trigger{
  display:inline-flex;align-items:center;gap:8px;
  min-height:40px;padding:0 14px;
  border:1px solid #2B414E;border-radius:12px;
  background:#1E2730;color:#F3F5F6;
  font-weight:800;font-size:14px;cursor:pointer;
  max-width:min(100vw - 24px,420px);
}
.jr2-cat-dd__trigger:hover{background:#26343E;border-color:#3A5260}
.jr2-cat-dd__label{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;
}
.jr2-cat-dd__chev{opacity:.75;font-size:12px;flex:0 0 auto}
.jr2-cat-dd__menu{
  position:absolute;top:calc(100% + 8px);left:0;z-index:90;
  min-width:260px;max-width:min(360px,calc(100vw - 24px));
  max-height:min(70vh,420px);overflow:auto;
  background:#0b151d;border:1px solid #243350;border-radius:14px;
  box-shadow:0 18px 40px rgba(0,0,0,.5);padding:8px;
}
.jr2-cat-dd__item{
  display:block;width:100%;text-align:left;text-decoration:none;
  color:#f3f6fb;padding:10px 12px;border-radius:9px;font-size:14px;font-weight:600;
  box-sizing:border-box;
}
.jr2-cat-dd__item:hover{background:#1b2942}
.jr2-cat-dd__item--primary{
  background:linear-gradient(180deg,rgba(255,151,9,.18),rgba(255,151,9,.08));
  color:#ffd08a;font-weight:800;margin-bottom:4px;
}
.jr2-cat-dd__item.is-current{color:#ff9709}
.jr2-cat-dd__sep{
  margin:8px 6px 4px;font-size:11px;color:#93a1bd;text-transform:uppercase;letter-spacing:.4px;font-weight:700;
}

body.jr-listing-v2-page .jr2-switcher-row{
  justify-content:flex-start !important;
}
body.jr-listing-v2-page .jr2-switcher{display:none !important} /* old pills gone */

[x-cloak]{display:none!important}
