/* Mobile shell and photo-search corrections — intentionally additive. */

/* Keep photo search visually integrated and never clip its controls. */
.photo-search-page{
  padding:16px 20px 24px!important;
  overflow:visible!important;
  max-height:none!important;
  height:auto!important;
}
.photo-search{
  margin:0!important;
  padding:14px!important;
  border-radius:12px!important;
  box-shadow:none!important;
  overflow:visible!important;
  max-height:none!important;
  height:auto!important;
}
.photo-search .module-card-title{margin-bottom:10px!important}
.photo-search .module-card-title h3{font-size:20px!important;line-height:1.15!important}
.photo-search-grid{
  grid-template-columns:minmax(220px,.62fr) minmax(360px,1.38fr)!important;
  gap:14px!important;
  align-items:start!important;
  overflow:visible!important;
  max-height:none!important;
  height:auto!important;
}
.photo-upload{
  grid-template-columns:1fr!important;
  gap:8px!important;
  overflow:visible!important;
  max-height:none!important;
  height:auto!important;
}
.photo-upload>img,.photo-placeholder{
  height:170px!important;
  min-height:170px!important;
  max-height:170px!important;
  object-fit:contain!important;
}
.photo-result{
  min-height:170px!important;
  padding:14px!important;
  overflow-wrap:anywhere;
  overflow:visible!important;
  max-height:none!important;
  height:auto!important;
}
.photo-listings{margin-top:12px!important}

/* Photo search and text marketplace search are two modes, not two pages piled
   on top of each other. The workspace itself becomes the scroll container while
   photo mode is active so long result sets always reach the bottom. */
html.bss-photo-focus .marketplace-page{display:none!important}
html.bss-photo-focus .workspace{
  overflow-y:auto!important;
  overflow-x:hidden!important;
}
html.bss-photo-focus .topbar{
  position:sticky!important;
  top:0!important;
  z-index:30!important;
  flex:none!important;
}
html.bss-photo-exit .photo-search-page{display:none!important}
.bss-back-marketplace{
  display:block;
  margin:14px 0 2px auto;
  min-height:42px;
  padding:0 16px;
  border:1px solid #aeb3b8;
  border-radius:8px;
  background:#fff;
  color:#171717;
  font-weight:900;
}
.bss-back-marketplace:hover,.bss-back-marketplace:focus-visible{
  border-color:#d90909;
  color:#d90909;
  outline:2px solid #ffd400;
  outline-offset:2px;
}

/* The photo action must look actionable when a file is selected. */
.photo-upload > button{
  width:100%;min-height:46px;border:0;border-radius:10px;background:var(--red);color:#fff;font:inherit;font-weight:900;cursor:pointer;
}
.photo-upload > button:disabled{background:#b8b8b8;color:#fff;opacity:.62;cursor:not-allowed}
.photo-upload > button:not(:disabled){opacity:1}
.photo-picker{min-height:46px;align-items:center;font-weight:900}
.photo-flow-status{margin:0 0 10px;padding:9px 11px;border-radius:9px;background:#f1f1f1;color:var(--content-muted,#3b4248);font-size:14px;font-weight:800;line-height:1.35}
.photo-flow-status[data-state="working"]{background:#fff4ca;color:#674d00}
.photo-flow-status[data-state="done"]{background:#e2f5e9;color:#086b3c}
.photo-flow-status[data-state="warning"],.photo-flow-status[data-state="error"]{background:#fff0e8;color:#8a3c00}

@media(max-width:1100px){.photo-search-grid{grid-template-columns:minmax(200px,.8fr) minmax(280px,1.2fr)!important}}

@media(max-width:760px){
  .topbar{width:100%!important;min-width:0!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;padding:18px 14px 16px!important;box-sizing:border-box!important;overflow:visible!important}
  .topbar .greeting{min-width:0!important;margin-left:86px!important;grid-column:1!important;grid-row:1!important}
  .topbar .greeting h1{margin:0!important;font-size:25px!important;line-height:1.08!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .topbar .greeting p{display:none!important}.topbar .bell{display:none!important}
  .topbar .profile-area{grid-column:2!important;grid-row:1!important;min-width:0!important}
  .topbar .user-menu{width:52px!important;min-width:52px!important;height:52px!important;padding:0!important;border-radius:50%!important;display:grid!important;place-items:center!important;overflow:hidden!important}
  .topbar .user-menu > span{width:52px!important;height:52px!important;display:grid!important;place-items:center!important;margin:0!important}
  .topbar .user-menu > b,.topbar .user-menu > i{display:none!important}
  .topbar .search{grid-column:1/-1!important;grid-row:2!important;width:100%!important;min-width:0!important;margin:2px 0 0!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) 48px 72px!important;gap:8px!important;align-items:center!important;box-sizing:border-box!important;overflow:hidden!important}
  .topbar .search > span{width:34px!important;min-width:34px!important;display:grid!important;place-items:center!important}
  .topbar .search input{min-width:0!important;width:100%!important;box-sizing:border-box!important;font-size:16px!important}
  .topbar .search .search-camera{width:48px!important;min-width:48px!important;height:48px!important;margin:0!important;padding:0!important}
  .topbar .search button[type=submit]{width:72px!important;min-width:72px!important;height:48px!important;margin:0!important;padding:0 8px!important;font-size:15px!important}
  .photo-search-page{padding:12px 12px 28px!important}
  .photo-search{margin-inline:0!important;padding:14px!important}
  .photo-search-grid{grid-template-columns:1fr!important;gap:14px!important}
  .photo-upload>img,.photo-placeholder{height:auto!important;min-height:190px!important;max-height:320px!important;object-fit:contain!important}
  .photo-picker,.photo-upload>button{width:100%!important;box-sizing:border-box!important}
  .photo-result{min-height:0!important}
  .bss-back-marketplace{width:100%;margin-top:14px}
}

@media(max-width:430px){
  .topbar .greeting{margin-left:78px!important}
  .topbar .greeting h1{font-size:23px!important}
  .topbar .search{grid-template-columns:30px minmax(0,1fr) 46px 66px!important;gap:6px!important}
  .topbar .search .search-camera{width:46px!important;min-width:46px!important}
  .topbar .search button[type=submit]{width:66px!important;min-width:66px!important;font-size:14px!important}
}
