/* Liscano Commerce OS v0.8.3 — compact mobile search / iOS keyboard stability.
 * These overrides deliberately affect only the search overlay and do not alter catalog or payments.
 */
@media (max-width:767px){
  body.lco-editorial #lco-search-panel{
    position:fixed!important;
    top:var(--lco-search-vv-top,0px)!important;
    left:0!important;right:0!important;bottom:auto!important;
    width:100%!important;max-width:100vw!important;
    height:var(--lco-search-vv-height,100dvh)!important;
    max-height:var(--lco-search-vv-height,100dvh)!important;
    padding:0!important;margin:0!important;
    display:flex!important;flex-direction:column!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:0!important;
    background:#fff!important;
    box-sizing:border-box!important;
    -webkit-text-size-adjust:100%;
    overscroll-behavior:none;
  }
  body.lco-editorial #lco-search-panel[hidden]{display:none!important}
  body.lco-editorial #lco-search-panel .lco-search-backdrop{display:none!important}
  body.lco-editorial #lco-search-panel .lco-search-dialog{
    flex:1 1 auto!important;
    display:flex!important;flex-direction:column!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:100%!important;max-height:100%!important;min-height:0!important;
    margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
    animation:none!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-head{
    flex:0 0 auto;display:grid!important;
    grid-template-columns:minmax(0,1fr) 38px;
    align-items:center;gap:10px;
    padding:calc(16px + env(safe-area-inset-top,0px)) 16px 14px!important;
    margin:0!important;
    min-width:0!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-head > div{min-width:0!important}
  body.lco-editorial #lco-search-panel .lco-search-eyebrow{
    font-size:9px!important;line-height:1.3!important;
    letter-spacing:.1em!important;overflow-wrap:anywhere;
  }
  body.lco-editorial #lco-search-panel .lco-search-head h2{
    margin:5px 0 0!important;
    font-size:clamp(23px,6.25vw,28px)!important;
    line-height:1.08!important;
    font-weight:750!important;
    letter-spacing:-.045em!important;
    text-wrap:balance;overflow-wrap:normal;
  }
  .lco-search-title-mobile{display:inline}
  .lco-search-title-desktop{display:none}
  body.lco-editorial #lco-search-panel .lco-search-close{
    display:grid!important;place-items:center!important;
    width:38px!important;height:38px!important;min-width:38px!important;
    padding:0!important;margin:0!important;
    align-self:center;justify-self:end;
  }
  body.lco-editorial #lco-search-panel form.lco-search-form{
    flex:0 0 auto!important;
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    width:calc(100% - 32px)!important;
    max-width:calc(100% - 32px)!important;
    min-width:0!important;
    min-height:54px!important;
    margin:0 16px!important;
    padding:5px 6px 5px 12px!important;
    border-radius:14px!important;
    border-width:1.5px!important;
    box-sizing:border-box!important;
  }
  body.lco-editorial #lco-search-panel form.lco-search-form .lco-search-glass{
    display:inline-flex;flex:0 0 20px!important;width:20px!important;
    align-items:center;justify-content:center;
  }
  body.lco-editorial #lco-search-panel form.lco-search-form .lco-search-glass svg{width:19px!important;height:19px!important}
  body.lco-editorial #lco-search-panel form.lco-search-form input[type="search"]{
    flex:1 1 0!important;
    display:block!important;width:1%!important;
    min-width:0!important;max-width:none!important;
    height:40px!important;min-height:40px!important;
    margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;
    line-height:1.3!important;
    font-size:16px!important; /* iOS Safari does not auto-zoom inputs >=16px. */
    font-weight:500!important;
    text-align:left!important;
    letter-spacing:-.01em!important;
    -webkit-text-size-adjust:100%;
    -webkit-appearance:none;
    appearance:none;
    box-shadow:none!important;
  }
  body.lco-editorial #lco-search-panel form.lco-search-form button.lco-search-submit{
    flex:0 0 40px!important;
    width:40px!important;min-width:40px!important;
    height:40px!important;min-height:40px!important;
    padding:0!important;margin:0!important;
    border-radius:10px!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-content{
    flex:1 1 auto!important;min-height:0!important;min-width:0!important;
    width:100%!important;
    padding:19px 16px calc(18px + env(safe-area-inset-bottom,0px))!important;
    margin:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
  }
  body.lco-editorial #lco-search-panel .lco-search-helper{
    margin:7px 0 18px!important;
    font-size:13px!important;line-height:1.5!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-popular{gap:7px!important}
  body.lco-editorial #lco-search-panel .lco-search-popular a{min-height:38px!important;padding:7px 12px!important;font-size:12px!important}
  body.lco-editorial #lco-search-panel .lco-search-result-grid{
    grid-template-columns:minmax(0,1fr)!important;width:100%!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-result{min-width:0!important;width:100%!important}
  body.lco-editorial #lco-search-panel .lco-search-footer{display:none!important}
}
/* Reset mobile-only display choices when desktop styles take over. */
@media(min-width:768px){
  .lco-search-title-mobile{display:none}
  .lco-search-title-desktop{display:inline}
}
@media(max-width:350px){
  body.lco-editorial #lco-search-panel .lco-search-head{padding-inline:13px!important}
  body.lco-editorial #lco-search-panel form.lco-search-form{
    width:calc(100% - 26px)!important;max-width:calc(100% - 26px)!important;margin-inline:13px!important;
  }
  body.lco-editorial #lco-search-panel .lco-search-content{padding-inline:13px!important}
}
