/* Searchable catalog / model select (EmLogicCatalogSelect) */
.catalog-select {
  position: relative;
  width: 100%;
  display: block;
  z-index: 1;
}
.catalog-select.is-open {
  z-index: 200;
}
.catalog-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.catalog-select-trigger {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--bg-panel, #fff);
  color: var(--text, #0f172a);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  min-height: 38px;
}
.catalog-select-trigger:hover {
  border-color: color-mix(in srgb, var(--primary, #2563eb) 45%, var(--border, #e2e8f0));
}
.catalog-select.is-open .catalog-select-trigger,
.catalog-select-trigger:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #2563eb) 18%, transparent);
}
.catalog-select.is-disabled .catalog-select-trigger,
.catalog-select-trigger:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-muted, #f8fafc);
}
.catalog-select-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catalog-select.is-empty .catalog-select-trigger-label {
  color: var(--text-muted, #64748b);
}
.catalog-select-caret {
  flex-shrink: 0;
  color: var(--text-muted, #64748b);
  font-size: 11px;
  line-height: 1;
}
/* Transparent hit layer: closes dropdown; does not dim the page */
.catalog-select-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: default;
}
.catalog-select-backdrop[hidden] {
  display: none !important;
}
.catalog-select-panel {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--bg-panel, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  flex-direction: column;
  max-height: min(340px, 55vh);
  display: none;
}
.catalog-select.is-open .catalog-select-panel {
  display: flex;
}
.catalog-select-panel[hidden] {
  display: none !important;
}
.catalog-select-search {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  background: var(--bg-alt, #fff);
  font: inherit;
  font-size: 13px;
  color: var(--text, #0f172a);
  outline: none;
}
.catalog-select-list {
  overflow: auto;
  max-height: 280px;
  padding: 6px;
}
.catalog-select-option {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text, #0f172a);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.catalog-select-option:hover,
.catalog-select-option:focus {
  background: var(--primary-soft, rgba(37, 99, 235, 0.08));
  outline: none;
}
.catalog-select-option.is-active {
  background: color-mix(in srgb, var(--primary, #2563eb) 14%, transparent);
  color: var(--primary, #2563eb);
  font-weight: 600;
}
.catalog-select-option.is-empty-opt {
  color: var(--text-muted, #64748b);
}
.catalog-select-empty,
.catalog-select-more {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--text-muted, #64748b);
  text-align: center;
}
/* Keep open dropdown above modal body siblings */
.modal .catalog-select.is-open,
.pkg-modal .catalog-select.is-open,
.payg-sheet .catalog-select.is-open {
  z-index: 30;
}
