/* engine_picker.css — visual engine picker (cards + drawer) */

/* Hide the original native select (kept in DOM for value/event compatibility). */
.ep-original-select {
  display: none !important;
}

.ep-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 6px;
}

/* ----- card grid ----- */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}

.ep-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px 8px 6px;
  background: var(--card-bg, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;       /* rounded square */
  color: var(--text, #e4e4e7);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease, background .12s ease;
  min-height: 88px;
  font: inherit;
  outline: none;
}
.ep-card:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.05);
  transform: translateY(-1px);
}
.ep-card.is-active {
  border-color: var(--accent, #3b82f6);
  background: rgba(59,130,246,0.10);
  box-shadow: 0 0 0 1px var(--accent, #3b82f6) inset;
}

.ep-logo {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  border-radius: 9px;
  overflow: hidden;
}
.ep-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}
.ep-logo-fallback {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}

.ep-name {
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-count {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  font-weight: 600;
  letter-spacing: .2px;
}
.ep-card.is-active .ep-count {
  background: var(--accent, #3b82f6);
  color: #fff;
}

/* ----- version drawer ----- */
.ep-drawer {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.ep-drawer.open { display: flex; }

.ep-drawer-head { display: flex; align-items: center; gap: 10px; }
.ep-drawer-title { display: flex; align-items: center; gap: 10px; }
.ep-drawer-name { font-size: 13px; font-weight: 700; }
.ep-drawer-co   { font-size: 10.5px; color: var(--text-dim, #94a3b8); margin-top: 1px; }

.ep-versions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ep-chip {
  font: inherit;
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text, #e4e4e7);
  border: 1px solid rgba(255,255,255,0.10);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease, transform .08s ease;
}
.ep-chip:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); }
.ep-chip.is-active {
  background: var(--accent, #3b82f6);
  border-color: var(--accent, #3b82f6);
  color: #fff;
}
.ep-chip.is-disabled { opacity: 0.45; cursor: not-allowed; }

.ep-empty-hint {
  font-size: 11.5px;
  color: var(--text-dim, #94a3b8);
  padding: 8px 4px;
  text-align: center;
  font-style: italic;
}
