/* Professional Create Listing asset picker */
#modal:has(.listing-picker-shell){
  width:min(980px,calc(100vw - 32px));
  max-width:980px;
  border-radius:20px;
  padding:0;
  overflow:hidden;
}
#modal:has(.listing-picker-shell) #modalContent{padding:0}
.listing-picker-shell{
  display:flex;
  flex-direction:column;
  min-height:0;
}
.listing-picker-head{
  display:flex;
  justify-content:space-between;
  gap:28px;
  padding:26px 28px 20px;
  border-bottom:1px solid var(--line);
}
.listing-picker-head>div:first-child{min-width:0;max-width:650px}
.listing-step{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:0 9px;
  border-radius:999px;
  background:color-mix(in srgb,var(--green) 12%,transparent);
  color:var(--green);
  font-size:.8rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.listing-picker-head h2{
  margin:10px 0 6px;
  font-size:1.45rem;
  letter-spacing:-.025em;
}
.listing-picker-head p{
  margin:0;
  max-width:620px;
  color:var(--muted);
  font-size:.88rem;
  line-height:1.5;
}
.listing-stepper{
  display:flex;
  align-items:center;
  align-self:flex-start;
  margin-top:4px;
}
.listing-stepper span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border:1px solid var(--line);
  border-radius:50%;
  color:var(--muted);
  background:var(--surface);
  font-size:.8rem;
  font-weight:900;
}
.listing-stepper span.active{
  color:#fff;
  background:var(--green);
  border-color:var(--green);
}
.listing-stepper i{
  width:22px;
  height:1px;
  background:var(--line);
}
.listing-picker-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:16px 28px 10px;
}
.listing-picker-section-head>div{
  display:flex;
  align-items:baseline;
  gap:9px;
}
.listing-picker-section-head strong{
  font-size:.9rem;
}
.listing-picker-section-head span{
  color:var(--muted);
  font-size:.8rem;
}
.listing-link-button{
  border:0;
  background:transparent;
  color:var(--muted);
  padding:4px 0;
  font-size:.8rem;
  font-weight:800;
  cursor:pointer;
}
.listing-link-button:hover{color:var(--ink)}
.listing-picker-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px!important;
  padding:0 28px 22px;
  max-height:430px;
  overflow:auto;
}
.listing-picker-card,
.inventory-picker-locked{
  min-width:0;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--surface);
  overflow:hidden;
  transition:border-color .14s ease,transform .14s ease,box-shadow .14s ease;
}
.listing-picker-card{
  cursor:pointer;
}
.listing-picker-card:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--green) 55%,var(--line));
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}
.listing-picker-card:focus-visible{
  outline:3px solid color-mix(in srgb,var(--green) 25%,transparent);
  outline-offset:2px;
}
.listing-picker-card .mth-asset-card-visual{
  height:112px!important;
  min-height:112px!important;
}
.listing-picker-card .mth-asset-card-body{
  padding:9px 10px 10px!important;
}
.inventory-picker-locked{
  opacity:.62;
  cursor:not-allowed;
}
.inventory-picker-locked .mth-asset-card-picker{
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.inventory-picker-lock-note{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:7px 9px;
  border-top:1px solid var(--line);
  background:var(--surface-2);
}
.inventory-picker-lock-note strong{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:0 7px;
  border-radius:999px;
  color:#d2a65c;
  background:rgba(210,166,92,.10);
  font-size:.8rem;
}
.inventory-picker-lock-note span{
  color:var(--muted);
  font-size:.8rem;
  line-height:1.2;
  text-align:right;
}
.listing-picker-empty{
  grid-column:1/-1;
  min-height:160px;
  display:grid;
  place-items:center;
  text-align:center;
}
.listing-picker-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 28px 18px;
  border-top:1px solid var(--line);
  background:var(--surface-2);
}
.listing-picker-note{
  max-width:620px;
  color:var(--muted);
  font-size:.8rem;
  line-height:1.45;
}
.listing-picker-footer .primary{
  flex:0 0 auto;
  min-height:42px;
  padding:9px 16px;
  border-radius:10px;
}
@media(max-width:820px){
  #modal:has(.listing-picker-shell){width:min(760px,calc(100vw - 24px))}
  .listing-picker-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
  #modal:has(.listing-picker-shell){
    width:calc(100vw - 12px);
    max-height:calc(100dvh - 12px);
    border-radius:16px;
  }
  .listing-picker-head{
    padding:20px 18px 16px;
    gap:12px;
  }
  .listing-stepper{display:none}
  .listing-picker-head h2{font-size:1.2rem}
  .listing-picker-head p{font-size:.82rem}
  .listing-picker-section-head{padding:14px 18px 9px}
  .listing-picker-grid{
    grid-template-columns:1fr;
    padding:0 18px 16px;
    max-height:50dvh;
  }
  .listing-picker-card .mth-asset-card-visual{height:108px!important;min-height:108px!important}
  .listing-picker-footer{
    align-items:stretch;
    flex-direction:column;
    padding:12px 18px 16px;
  }
  .listing-picker-footer .primary{width:100%}
}


/* 2026-10-06 — Picker reuses canonical Inventory card geometry exactly. */
.listing-picker-grid{
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important;
  align-content:start;
  max-height:min(430px,48vh)!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  padding-right:20px!important;
}
.listing-picker-grid::-webkit-scrollbar{width:8px}
.listing-picker-grid::-webkit-scrollbar-track{background:transparent}
.listing-picker-grid::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--muted) 35%,transparent);
  border-radius:999px;
}
.listing-picker-grid::-webkit-scrollbar-thumb:hover{
  background:color-mix(in srgb,var(--muted) 55%,transparent);
}

/* Do not redefine canonical mth-asset-card sizing in the listing picker. */
.listing-picker-card{
  border-radius:12px!important;
}
.listing-picker-card.mth-asset-card,
.listing-picker-card .mth-asset-card{
  padding:8px!important;
  grid-template-rows:auto 86px auto!important;
  gap:6px!important;
}
.listing-picker-card .mth-asset-card-visual,
.listing-picker-card.mth-asset-card .mth-asset-card-visual{
  height:auto!important;
  min-height:0!important;
}
.listing-picker-card .mth-asset-card-body{
  padding:0!important;
}

/* Locked cards occupy exactly one Inventory-card slot too. */
.inventory-picker-locked{
  border-radius:12px!important;
  display:flex;
  flex-direction:column;
  min-width:0;
}
.inventory-picker-locked .mth-asset-card-picker{
  flex:0 0 auto;
}
.inventory-picker-lock-note{
  margin-top:auto;
  min-height:34px;
}

/* Let more Inventory-sized cards fit before scrolling on desktop. */
@media(min-width:821px){
  #modal:has(.listing-picker-shell){
    width:min(1040px,calc(100vw - 32px));
    max-width:1040px;
  }
}
@media(max-width:820px){
  .listing-picker-grid{
    grid-template-columns:repeat(auto-fill,minmax(138px,1fr))!important;
    max-height:min(420px,48vh)!important;
  }
}
@media(max-width:560px){
  .listing-picker-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    max-height:46dvh!important;
  }
  .listing-picker-card.mth-asset-card,
  .listing-picker-card .mth-asset-card{
    grid-template-rows:auto 78px auto!important;
    padding:7px!important;
  }
}
