/* API Key vendor chooser: scoped to the key form, using existing theme tokens. */
.api-key-vendors {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.api-key-vendors legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
}
.api-key-vendor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.api-key-vendor-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 104px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 5px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
  color: var(--foreground);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    box-shadow 0.15s;
}
.api-key-vendor-card:hover:not(:disabled) {
  background: var(--muted);
}
.api-key-vendor-card[aria-pressed='true'] {
  border-color: var(--foreground);
  box-shadow: 0 0 0 1px var(--foreground);
  background: var(--muted);
}
.api-key-vendor-card:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}
.api-key-vendor-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.api-key-vendor-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}
.api-key-vendor-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 36px;
}
.api-key-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.api-key-brand svg {
  width: 25px;
  height: 25px;
  flex: none;
}
.api-key-brand.claude {
  background: #faeee5;
  color: #e95e0d;
}
.api-key-brand.openai {
  background: #e8f8ef;
  color: #00a84f;
}
.api-key-brand.deepseek {
  background: #eef9fa;
  color: #169f9c;
}
.api-key-brand.kimi {
  background: #fff0f8;
  color: #d75a99;
}
.api-key-brand.gemini {
  background: #eaf1ff;
  color: #3269ff;
}
.api-key-brand.grok {
  background: #ededed;
  color: #292929;
}
.api-key-vendor-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 11px;
  line-height: 1;
  border-radius: 100%;
  color: var(--background);
}
.api-key-vendor-card[aria-pressed='true'] .api-key-vendor-check {
  background: var(--foreground);
}
.api-key-vendor-hint {
  margin: 10px 0 0;
  color: var(--muted-foreground);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .api-key-vendor-grid {
    gap: 6px;
  }
  .api-key-vendor-card {
    min-height: 96px;
    padding: 12px 3px;
    border-radius: 12px;
  }
  .api-key-vendor-label {
    font-size: 11px;
  }
  .api-key-brand {
    width: 27px;
    height: 30px;
    border-radius: 8px;
  }
  .api-key-brand svg {
    width: 21px;
    height: 21px;
  }
  .api-key-vendor-logo {
    gap: 3px;
  }
}
