.emg-model-chooser [hidden] { display: none !important; }
.emg-model-controls { display: grid; gap: 6px; margin-bottom: 10px; }
.emg-model-controls label { margin: 0; color: #526b83; font: 600 11px/1.4 sans-serif; }
.emg-model-chooser .emg-model-series,
.emg-model-chooser .emg-model-search {
  box-sizing: border-box; width: 100%; min-width: 0; height: 42px;
  margin: 0 0 4px !important; padding: 0 10px; border: 1px solid #dbe5ef;
  border-radius: 9px; background: #f7fafd; color: #28435e; font: 500 13px/1.3 sans-serif;
}
.emg-model-chooser .emg-model-groups { list-style: none; }
.emg-model-chooser .emg-model-reset {
  box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 40px; margin: 0 0 10px; padding: 8px 12px;
  border: 1px solid #c9e3f8; border-radius: 9px; background: #eaf5ff;
  color: #006dcc; text-decoration: none; font: 600 12px/1.4 sans-serif;
  grid-column: 1 / -1; order: 1;
}
.emg-model-chooser .emg-model-reset:hover { background: #dcefff; color: #00579f; }
.emg-model-chooser .emg-model-reset:focus-visible { outline: 2px solid #087fea; outline-offset: 2px; }
.emg-model-chooser .emg-model-group { margin: 2px 0; border-bottom: 1px solid #edf2f7; }
.emg-model-chooser .emg-model-group summary {
  display: list-item; padding: 10px 8px; color: #28435e;
  cursor: pointer; font: 650 13px/1.4 sans-serif;
}
.emg-model-chooser .emg-model-group summary span {
  float: right; color: #72869a; font-size: 11px; font-weight: 400;
}
.emg-model-chooser .emg-model-group ul { margin: 0 !important; padding: 0 0 6px !important; list-style: none; }
.emg-model-chooser .emg-model-years { display: block; margin-top: 3px; font-size: 11px; color: #72869a; font-weight: 400; }
.emg-model-chooser summary:focus-visible { outline: 2px solid #087fea; outline-offset: -2px; border-radius: 6px; }
body.emg-catalog-design .spcts-scope .emg-model-chooser .spc-model-dropdown { max-width: 100%; white-space: normal; }
@media (max-width: 1100px) {
  body.emg-catalog-design .spcts-scope .emg-model-chooser {
    grid-template-columns: minmax(150px,.7fr) minmax(240px,1.3fr) minmax(240px,1fr);
  }
  .emg-model-controls { margin: 0; grid-template-columns: 1fr 1fr; gap: 5px 8px; }
  .emg-model-controls label { grid-row: 1; }
  .emg-model-controls select, .emg-model-controls input { grid-row: 2; }
}
@media (max-width: 780px) {
  body.emg-catalog-design .spcts-scope .emg-model-chooser { display: block; }
  body.emg-catalog-design .spcts-scope .emg-model-chooser .spc-model-sidebar__title { margin-bottom: 10px !important; }
  .emg-model-controls { margin-bottom: 8px; }
}

/* Keep the desktop model chooser beside the products, within its catalog column. */
body.emg-catalog-design .spcts-scope .emg-model-chooser.emg-model-follow {
  position: sticky !important;
  top: var(--emg-model-follow-top, 16px) !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  max-height: calc(100vh - var(--emg-model-follow-top, 16px) - 16px);
  max-height: calc(100dvh - var(--emg-model-follow-top, 16px) - 16px);
}
body.emg-catalog-design .emg-model-follow > .spc-model-sidebar__title,
body.emg-catalog-design .emg-model-follow > .emg-model-controls,
body.emg-catalog-design .emg-model-follow > .emg-model-reset { flex-shrink: 0; }
body.emg-catalog-design .spcts-scope .emg-model-follow > .spc-model-list {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
body.emg-catalog-design .spc-layout > .emg-model-follow-track { align-self: stretch; min-width: 0; }
body.emg-shop-design .emg-shop-layout > .emg-model-follow-column { align-self: stretch; }
body.emg-catalog-design .emg-model-follow > .emg-model-reset { order: 0; }
