/* LiteLLM Models + Endpoints — endpoint metadata and router-pool controls.
   Kept outside the package and injected by nginx for upgrade resilience. */

/* The base URL is treated as operational data: protocol is separated into a
   compact signal, while the host/path stays monospace and copyable. */
.router-host-url-heading {
  align-items: baseline;
  display: inline-flex;
  gap: 7px;
  white-space: nowrap;
}

.router-host-url-heading-hint {
  color: #94a3b8;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.router-host-url-cell {
  max-width: 240px;
}

.router-host-url {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #334155;
  cursor: copy;
  display: flex;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
  padding: 4px 6px;
  text-align: left;
  transition: background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease;
  width: 100%;
}

.router-host-url:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.router-host-url:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.router-host-url-protocol {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  color: #1d4ed8;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.035em;
  line-height: 17px;
  padding: 0 4px;
  text-transform: uppercase;
}

.router-host-url.is-http .router-host-url-protocol {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.router-host-url-address {
  font-size: 11px;
  line-height: 20px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.router-host-url-copy {
  color: #94a3b8;
  display: inline-flex;
  flex: 0 0 auto;
  margin-left: auto;
}

.router-host-url-copy svg {
  height: 14px;
  width: 14px;
}

.router-host-url:hover .router-host-url-copy,
.router-host-url:focus-visible .router-host-url-copy {
  color: #2563eb;
}

.router-host-url-default {
  color: #94a3b8;
  display: inline-block;
  font-size: 11px;
  font-style: italic;
  padding: 5px 6px;
}

/* Disabled deployments stay visible on Model Health Status, but stale provider
   results are replaced by an explicit administrative state. */
.router-health-disabled-row {
  background-image: linear-gradient(
    90deg,
    rgba(245, 158, 11, 0.045),
    transparent 42%
  );
}

.router-health-disabled-cell > :not(.router-health-disabled-badge) {
  display: none !important;
}

.router-health-disabled-badge {
  align-items: center;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  color: #9a3412;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.router-health-disabled-row [data-testid="run-health-check-btn"] {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  cursor: not-allowed !important;
}

.router-health-disabled-row input[type="checkbox"] {
  cursor: not-allowed !important;
  opacity: 0.45;
}

.router-pool-toggle {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 30px;
  justify-content: center;
  padding: 0;
  transition: background-color 140ms ease, border-color 140ms ease,
    box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
  width: 30px;
}

.router-pool-toggle svg {
  height: 16px;
  width: 16px;
}

.router-pool-toggle:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
  transform: translateY(-1px);
}

.router-pool-toggle.is-disabled {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.router-pool-toggle.is-disabled:hover {
  background: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}

.router-pool-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.router-pool-toggle:disabled,
.router-pool-toggle.is-saving {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

/* Disabled rows remain readable/editable, but the amber rail makes their
   non-routing state visible without turning the whole table into status color. */
tr.router-pool-disabled > td {
  background-color: #fffdf5 !important;
}

tr.router-pool-disabled > td:first-child {
  box-shadow: inset 3px 0 0 #f59e0b;
}

.router-pool-badge {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  color: #92400e;
  display: block;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  margin-top: 4px;
  padding: 0 7px;
  width: max-content;
}

.router-pool-toast {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  bottom: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.3);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 11px 15px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10000;
}

.router-pool-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.router-pool-toast.is-error {
  background: #7f1d1d;
}

@media (max-width: 768px) {
  .router-host-url-cell {
    min-width: 220px !important;
  }

  .router-host-url {
    min-height: 40px;
  }

  .router-pool-toggle {
    height: 40px;
    width: 40px;
  }

  .router-pool-toggle svg {
    height: 18px;
    width: 18px;
  }

  .router-pool-toast {
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .router-host-url,
  .router-pool-toggle,
  .router-pool-toast {
    transition: none;
  }
}
