/* Autonomous system networks tab — prefix containment tree. */

.ce-as-nets-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ce-as-nets-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--ce-line-soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
}

.ce-as-nets-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ce-text-dim);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.ce-as-nets-tab:hover {
  color: var(--ce-text);
}

.ce-as-nets-tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ce-text);
}

.ce-as-nets-tab-count {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ce-text-dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

.ce-as-nets-tab.is-active .ce-as-nets-tab-count {
  color: var(--ce-text);
}

.ce-as-nets-filter {
  width: min(320px, 100%);
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--ce-line-soft);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ce-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

.ce-as-nets-filter::placeholder {
  color: var(--ce-text-dim);
}

.ce-as-nets-filter:focus {
  border-color: var(--ce-accent);
  outline: none;
}

.ce-as-nets-table {
  width: 100%;
  border-collapse: collapse;
}

.ce-as-nets-table th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ce-line-soft);
  color: var(--ce-text-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.ce-as-nets-table td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--ce-line-subtle);
  font-size: 13px;
}

.ce-as-nets-col-type,
.ce-as-nets-col-addresses {
  text-align: center;
}

.ce-as-nets-row:hover td {
  background: var(--ce-surface-hover);
}

.ce-as-nets-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ce-as-nets-prefix {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.ce-as-nets-guide {
  width: 10px;
  height: 12px;
  flex: 0 0 auto;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--ce-line-soft);
  border-left: 1px solid var(--ce-line-soft);
  border-bottom-left-radius: 4px;
}

.ce-as-nets-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ce-text-dim);
  cursor: pointer;
  transition: color 160ms ease;
}

.ce-as-nets-toggle:hover {
  color: var(--ce-accent-light);
}

.ce-as-nets-toggle::before {
  content: '';
  border: 5px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
  transition: transform 160ms ease;
}

.ce-as-nets-toggle.is-collapsed::before {
  transform: rotate(-90deg) translateY(-2px);
}

.ce-as-nets-state {
  margin: 18px 0 0;
  color: var(--ce-text-muted);
  font-size: 13px;
  text-align: center;
}

/* While the filter is active the list is flat: no indentation, no carets. */
.ce-as-nets--flat .ce-as-nets-label {
  padding-left: 0 !important;
}

.ce-as-nets--flat .ce-as-nets-toggle,
.ce-as-nets--flat .ce-as-nets-guide {
  visibility: hidden;
}
