/* Custom providers + RunPod capability overlay (settings modal, Plan 96.0/96.1).
   Extracted from settings-modal.css (400-line limit). Form layout follows the
   "Add provider" house pattern: <details> folds with stacked full-width controls. */

.custom-providers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.custom-provider-section {
  border: 1px solid oklch(var(--b3));
  border-radius: 0.5rem;
  overflow: hidden;
}

/* The header is a <details> summary: click to open the provider edit form (96.1). */
.custom-provider-details > summary { list-style: none; }
.custom-provider-details > summary::-webkit-details-marker { display: none; }
.custom-provider-details[open] .custom-model-chevron { transform: rotate(90deg); }

.custom-provider-edit {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid oklch(var(--b3));
}

.custom-provider-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: oklch(var(--b2));
  font-size: 0.8rem;
}

.custom-provider-name {
  font-weight: 600;
  flex-shrink: 0;
}

.custom-provider-url {
  flex: 1;
  opacity: 0.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
  min-width: 0;
}

.custom-provider-delete {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.4;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.1rem;
  color: inherit;
}
.custom-provider-delete:hover { opacity: 1; color: oklch(var(--er)); }

.custom-provider-models {
  padding: 0.4rem 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Each saved model is a <details>: summary = compact row, body = edit form (96.1). */
.custom-model-details > summary { list-style: none; }
.custom-model-details > summary::-webkit-details-marker { display: none; }

.custom-model-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  padding: 0.2rem 0;
  cursor: pointer;
}

.custom-model-chevron {
  font-size: 0.6rem;
  opacity: 0.45;
  transition: transform 0.15s ease;
}

.custom-model-details[open] .custom-model-chevron { transform: rotate(90deg); }

.custom-model-name {
  font-weight: 500;
  flex-shrink: 0;
}

.custom-model-hint {
  flex: 1;
  opacity: 0.5;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Capability form fields (shared by add-model and per-model edit folds) */

.custom-cap-block {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.custom-cap-label {
  color: oklch(var(--bc) / 0.6);
  font-size: 0.72rem;
}

.custom-cap-advanced { margin-top: 0.25rem; }

/* RunPod capability overlay (admin-only, D7) */

.runpod-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.runpod-admin-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.runpod-admin-name {
  font-weight: 600;
  font-size: 0.8rem;
  flex: 1 1 100%;
}

.runpod-admin-row .input { flex: 1 1 8rem; min-width: 6rem; }
/* Compact the full-width toggle rows down to inline label+toggle pairs here. */
.runpod-admin-row .label { padding: 0; gap: 0.35rem; }
