.permission {
  display: grid;
  gap: 6px;
  padding: 12px 0;
}

.toggleRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--dsw-alias-label-secondary);
}

.toggleLabel {
  flex: 1;
  min-width: 0;
}

.switch {
  box-sizing: border-box;
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 20px;
  padding: 2px;
  border: 0;
  border-radius: 10px;
  background: var(--dsw-alias-border-l3);
  cursor: pointer;
}

.switchOn {
  background: var(--dsw-alias-brand-primary);
}

.switch:disabled {
  cursor: default;
  opacity: 0.5;
}

.switch:focus-visible {
  outline: 2px solid var(--dsw-alias-brand-primary);
  outline-offset: 2px;
}

.thumb {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dsw-alias-label-primary-foreground);
  transition: transform 120ms ease;
}

.switchOn .thumb {
  transform: translateX(16px);
}

.selection {
  display: grid;
  gap: 10px;
}

.hint,
.notice,
.invalid,
.conflict {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.hint,
.notice {
  color: var(--dsw-alias-label-tertiary);
}

.invalid,
.conflict {
  color: var(--dsw-alias-label-error);
}

.catalogError {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--dsw-alias-label-error);
}

.catalogError button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--dsw-alias-brand-primary);
  cursor: pointer;
}

.models {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-height: 280px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 8px;
}

.models legend {
  padding: 0 4px;
  font-size: 12px;
  color: var(--dsw-alias-label-secondary);
}

.modelGroup {
  display: grid;
  gap: 6px;
}

.modelGroup + .modelGroup {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--dsw-alias-border-l3);
}

.providerName {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--dsw-alias-label-tertiary);
}

.model {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
}

.model:hover {
  background: var(--dsw-alias-bg-layer-4);
}

.modelName,
.route {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modelName {
  font-size: 13px;
  color: var(--dsw-alias-label-primary);
}

.route {
  margin-top: 2px;
  font-size: 11px;
  color: var(--dsw-alias-label-tertiary);
}

.unavailable {
  font-size: 11px;
  color: var(--dsw-alias-label-tertiary);
}
