/* MJS Traders – site search panel (search-box.js). Colours and type follow the MJS listing pages. */

.msb{--ink:#2c2c2c;--mut:#666;--line:#e6e6e6;--soft:#f6f6f4;--y:#f3cc2e;--dark:#1d1d1d;--msb-right:16px;
  position:absolute;left:0;right:0;z-index:10050;height:0;font-family:Lato,system-ui,sans-serif;color:var(--ink);text-align:left;text-transform:none;letter-spacing:normal}
.msb[hidden]{display:none}

/* a dropdown under the header, beside the search icon: the page stays visible and usable */
.msb-panel{position:absolute;top:0;right:var(--msb-right);width:min(760px,calc(100% - 32px));max-height:min(620px,calc(100vh - 140px));display:flex;flex-direction:column;
  background:#fff;border:1px solid var(--line);border-top:3px solid var(--y);border-radius:0 0 12px 12px;box-shadow:0 18px 40px rgba(0,0,0,.22);overflow:hidden;
  transform:translateY(-6px);opacity:0;transition:transform .18s,opacity .18s}
.msb.is-in .msb-panel{transform:none;opacity:1}

/* input row */
.msb-form{display:flex;align-items:center;gap:12px;padding:10px 12px 10px 18px;border-bottom:1px solid var(--line);background:#fff;position:relative}
.msb-form::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--y);transform:scaleX(0);transform-origin:left;transition:transform .25s}
.msb.is-busy .msb-form::after{transform:scaleX(.7);transition:transform 1.2s ease-out}
.msb-form>svg{width:22px;height:22px;flex:none;color:#9a9a9a}
.msb-form input{flex:1;min-width:0;border:0;outline:0;background:none;font:400 18px/1.3 Lato,system-ui,sans-serif;color:var(--ink);-webkit-text-fill-color:var(--ink);padding:8px 0;height:auto;box-shadow:none}
.msb-form input::placeholder{color:#a3a3a3}
.msb-form input::-webkit-search-cancel-button{-webkit-appearance:none}
.msb-close{flex:none;border:1px solid var(--line);background:var(--soft);border-radius:8px;padding:6px 10px;font:700 11px/1 Lato,sans-serif;color:var(--mut);cursor:pointer;letter-spacing:.04em;text-transform:uppercase}
.msb-close:hover{border-color:#cfcfcf;color:var(--ink)}

/* body */
.msb-body{overflow:auto;padding:6px 20px 18px;overscroll-behavior:contain}
.msb-sec{margin-top:16px}
.msb-sec h3{margin:0 0 10px;font:400 13px/1.2 'Fjalla One',sans-serif;letter-spacing:.08em;text-transform:uppercase;color:#8a8a8a}
.msb-fixed{margin:14px 0 0;font-size:14px;color:var(--mut)}
.msb-fixed b{color:var(--ink)}

.msb-chips{display:flex;flex-wrap:wrap;gap:8px}
.msb-chip{display:inline-flex;align-items:center;padding:8px 14px;border-radius:999px;background:var(--soft);border:1px solid var(--line);color:var(--ink);font-size:14px;text-decoration:none;transition:background .15s,border-color .15s}
.msb-chip:hover,.msb-chip.is-active{background:#fff8d6;border-color:var(--y)}

.msb-jobs{display:flex;flex-wrap:wrap;gap:10px}
.msb-job{display:flex;align-items:center;gap:10px;padding:6px 14px 6px 6px;border:1px solid var(--line);border-radius:999px;color:var(--ink);text-decoration:none;font-size:14px;background:#fff}
.msb-job img{width:40px;height:40px;border-radius:50%;object-fit:cover;background:#ddd}
.msb-job:hover,.msb-job.is-active{border-color:var(--y);background:#fffbe8}

.msb-grid{display:grid;grid-template-columns:260px 1fr;gap:28px}
.msb-side .msb-jobs{flex-direction:column;align-items:stretch}
.msb-side .msb-job{border-radius:10px}
.msb-cats{list-style:none;margin:0;padding:0}
.msb-cats a{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;margin:0 -10px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:15px}
.msb-cats small{color:#999;font-size:12px;min-width:26px;text-align:right}
.msb-cats a:hover,.msb-cats a.is-active{background:#fffbe8}
.msb-cats a.is-active span,.msb-cats a:hover span{text-decoration:underline;text-decoration-color:var(--y);text-underline-offset:3px}

.msb-prods ul{list-style:none;margin:0;padding:0}
.msb-prod{display:flex;align-items:center;gap:14px;padding:8px;margin:0 -8px;border-radius:10px;color:var(--ink);text-decoration:none}
.msb-prod:hover,.msb-prod.is-active{background:#f7f7f5;box-shadow:inset 3px 0 0 var(--y)}
.msb-ph{flex:none;width:56px;height:56px;border-radius:8px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;overflow:hidden}
.msb-ph img{max-width:100%;max-height:100%;object-fit:contain}
.msb-pt{display:flex;flex-direction:column;min-width:0}
.msb-pt small{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#8a8a8a}
.msb-pt b{font-weight:700;font-size:15px;line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.msb-pt b mark{background:none;color:inherit;box-shadow:inset 0 -.38em 0 rgba(243,204,46,.55)}
.msb-pt em{font-style:normal;font-size:14px;font-weight:700;color:#1f7a3a;margin-top:2px}

.msb-none{margin-top:18px;padding:18px 20px;border-radius:12px;background:var(--soft)}
.msb-none b{font-size:16px}
.msb-none p{margin:6px 0 12px;color:var(--mut)}
.msb-wa{display:inline-block;padding:10px 18px;border-radius:8px;background:#1f7a3a;color:#fff;font-weight:700;text-decoration:none}
.msb-wa:hover{background:#18632f;color:#fff}

/* footer */
.msb-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px;border-top:1px solid var(--line);background:var(--soft);font-size:13px;color:var(--mut)}
.msb-foot:empty{display:none}
.msb-foot a{color:var(--ink);font-weight:700;text-decoration:none}
.msb-all{display:inline-flex;align-items:center;gap:8px;padding:10px 16px;border-radius:8px;background:var(--dark);color:#fff!important;font-size:14px}
.msb-all:hover,.msb-all.is-active{background:#000;box-shadow:0 0 0 3px var(--y)}
.msb-tip b{color:var(--ink)}
.msb-keys kbd{display:inline-block;min-width:20px;padding:2px 5px;margin:0 2px;border:1px solid #d6d6d6;border-bottom-width:2px;border-radius:4px;background:#fff;font:11px/1.3 Lato,sans-serif;text-align:center;color:var(--ink)}

/* phones: full width under the header, part of the screen only, so the page is still there below it */
@media (max-width:760px){
  .msb-panel{top:0;right:0;width:100%;max-height:72vh;border-left:0;border-right:0;border-radius:0 0 14px 14px}
  .msb-form{padding:8px 10px 8px 14px}
  .msb-form input{font-size:16px}
  .msb-body{padding:4px 14px 14px}
  .msb-grid{grid-template-columns:1fr;gap:4px}
  .msb-prods{order:-1}
  .msb-side .msb-jobs{flex-direction:row}
  .msb-keys,.msb-tip{display:none}
  .msb-foot{justify-content:stretch;padding:10px 14px}
  .msb-all{flex:1;justify-content:center}
}
@media (prefers-reduced-motion:reduce){.msb-panel,.msb-form::after{transition:none}}
