/* The default look of the keys section.
 *
 * The product may replace it entirely: the class names are props
 * (`classNames`), and a product with a design system links nothing here.
 * The rules below are the fallback, not the opinion — neutral borders, the
 * page's own font and colour, and a dark scheme that follows the system.
 */

.api-keys {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.api-keys__title {
  margin: 0;
  font-size: 1.1rem;
}

.api-keys__description {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

.api-keys__error {
  margin: 0;
  color: #c62828;
}

.api-keys__secret {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid currentColor;
  border-radius: 8px;
}

.api-keys__code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas,
    monospace;
  font-size: 0.85em;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(127, 127, 127, 0.14);
  word-break: break-all;
}

pre.api-keys__code {
  display: block;
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
  white-space: pre;
}

.api-keys__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.api-keys__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
}

.api-keys__name {
  font-weight: 600;
}

.api-keys__meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.api-keys__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.api-keys__button {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(127, 127, 127, 0.4);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.api-keys__button:hover:not(:disabled) {
  background: rgba(127, 127, 127, 0.12);
}

.api-keys__button:disabled {
  opacity: 0.5;
  cursor: default;
}

.api-keys__button--danger {
  color: #c62828;
  border-color: rgba(198, 40, 40, 0.5);
}

.api-keys__form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.api-keys__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.api-keys__input {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(127, 127, 127, 0.4);
  border-radius: 6px;
  background: transparent;
  color: inherit;
}

.api-keys__muted {
  font-size: 0.85rem;
  opacity: 0.7;
}