/**
 * Phase 34.7 — Dense HE.net light UI + compact SEO hero + 3D feature icons
 */

.ar-bgp {
  --bgp-bg: #ffffff;
  --bgp-ink: #0f172a;
  --bgp-muted: #64748b;
  --bgp-line: #e2e8f0;
  --bgp-purple: #4b0082;
  --bgp-magenta: #a12273;
  --bgp-green: #10b981;
  --bgp-red: #ef4444;
  --bgp-amber: #f59e0b;
  --bgp-sky: #0284c7;
  --bgp-mono: ui-monospace, "Cascadia Code", Consolas, "Vazirmatn", monospace;
  color: var(--bgp-ink);
  background: var(--bgp-bg);
  padding: 0.55rem 0 0.85rem;
}

.ar-bgp__shell { max-width: 66rem; }

.ar-bgp-seo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.1rem;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--bgp-line);
  border-radius: 12px;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(161, 34, 115, 0.06), transparent 55%),
    linear-gradient(135deg, #fff 0%, #faf8fc 100%);
}

.ar-bgp-seo__copy {
  flex: 1 1 16rem;
  min-width: 0;
}

.ar-bgp-seo__title {
  margin: 0 0 0.28rem;
  font-size: clamp(0.98rem, 1.9vw, 1.18rem);
  font-weight: 850;
  line-height: 1.4;
  color: var(--bgp-ink);
  letter-spacing: -0.015em;
}

.ar-bgp-seo__lead {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--bgp-muted);
  max-width: 48ch;
}

.ar-bgp-seo__feats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  perspective: 700px;
}

.ar-bgp-feat {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  color: var(--bgp-muted);
  font: inherit;
  transform-style: preserve-3d;
  transition: transform 0.22s ease, color 0.22s ease;
}

.ar-bgp-feat__face {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 12px;
  color: var(--bgp-purple);
  background:
    linear-gradient(160deg, #ffffff 0%, #f3eef8 100%);
  border: 1px solid rgba(75, 0, 130, 0.12);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 6px 14px rgba(15, 23, 42, 0.08),
    0 2px 4px rgba(75, 0, 130, 0.08);
  transform: translateZ(0) rotateX(0deg);
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease;
}

.ar-bgp-feat__lbl {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ar-bgp-feat:hover,
.ar-bgp-feat:focus-visible {
  color: var(--bgp-magenta);
  outline: none;
}

.ar-bgp-feat:hover .ar-bgp-feat__face,
.ar-bgp-feat:focus-visible .ar-bgp-feat__face {
  transform: translateY(-5px) rotateX(12deg) rotateY(-8deg) scale(1.04);
  border-color: rgba(161, 34, 115, 0.28);
  background:
    linear-gradient(155deg, #fff 0%, #f7eef5 55%, #efe6f8 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 14px 22px rgba(15, 23, 42, 0.14),
    0 4px 0 rgba(75, 0, 130, 0.12),
    0 0 0 3px rgba(161, 34, 115, 0.08);
}

.ar-bgp-feat:active .ar-bgp-feat__face {
  transform: translateY(-1px) rotateX(4deg) scale(0.98);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 8px rgba(15, 23, 42, 0.1);
}

@media (prefers-reduced-motion: reduce) {
  .ar-bgp-feat,
  .ar-bgp-feat__face {
    transition: none;
  }
  .ar-bgp-feat:hover .ar-bgp-feat__face,
  .ar-bgp-feat:focus-visible .ar-bgp-feat__face {
    transform: none;
  }
}

.ar-bgp-search {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.ar-bgp-input {
  flex: 1;
  min-width: 0;
  height: 2.25rem;
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  padding: 0 0.7rem;
  font-family: var(--bgp-mono);
  font-size: 0.86rem;
  outline: none;
}

.ar-bgp-input:focus {
  border-color: rgba(75, 0, 130, 0.45);
  box-shadow: 0 0 0 3px rgba(75, 0, 130, 0.1);
}

.ar-bgp-run {
  appearance: none;
  border: 0;
  border-radius: 8px;
  height: 2.25rem;
  padding: 0 0.95rem;
  background: var(--bgp-purple);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ar-bgp-run:disabled { opacity: 0.55; }

.ar-bgp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.ar-bgp-chip {
  appearance: none;
  border: 1px solid var(--bgp-line);
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
  background: #fff;
  color: var(--bgp-muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.ar-bgp-chip:hover {
  color: var(--bgp-purple);
  border-color: rgba(75, 0, 130, 0.3);
}

.ar-bgp-status {
  margin-inline-start: auto;
  font-size: 0.65rem;
  font-family: var(--bgp-mono);
  color: var(--bgp-muted);
}

.ar-bgp-target { margin-bottom: 0.4rem; }
.ar-bgp-target[hidden] { display: none !important; }

.ar-bgp-target__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.3rem;
}

.ar-bgp-target__ip {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--bgp-mono);
  direction: ltr;
  text-align: start;
}

.ar-bgp-sanction {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--bgp-line);
  font-size: 0.68rem;
  font-weight: 800;
}

.ar-bgp-sanction[hidden] { display: none !important; }

.ar-bgp-sanction.is-clear {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.28);
}

.ar-bgp-sanction.is-restricted {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.28);
}

.ar-bgp-target__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.ar-bgp-pill {
  display: inline-flex;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--bgp-line);
  background: #f8fafc;
  font-family: var(--bgp-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--bgp-sky);
}

.ar-bgp-pill[hidden] { display: none !important; }
.ar-bgp-pill--green { color: #047857; background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.25); }
.ar-bgp-pill--rpki-valid { color: #047857; background: rgba(16, 185, 129, 0.12); }
.ar-bgp-pill--rpki-invalid { color: #b91c1c; background: rgba(239, 68, 68, 0.1); }
.ar-bgp-pill--rpki-unknown { color: #b45309; background: rgba(245, 158, 11, 0.12); }

.ar-bgp-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--bgp-line);
  margin-bottom: 0.45rem;
}

.ar-bgp-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.4rem 0.65rem;
  background: transparent;
  color: var(--bgp-muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  cursor: pointer;
}

.ar-bgp-tab.is-on {
  color: var(--bgp-purple);
  border-bottom-color: var(--bgp-purple);
}

.ar-bgp-panel[hidden] { display: none !important; }

.ar-bgp-table-wrap {
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.ar-bgp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.ar-bgp-table th,
.ar-bgp-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--bgp-line);
  text-align: start;
  vertical-align: middle;
}

.ar-bgp-table th {
  background: #f8fafc;
  color: var(--bgp-muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.ar-bgp-table tbody tr:last-child td { border-bottom: 0; }

.ar-bgp-table td {
  font-family: var(--bgp-mono);
  direction: ltr;
  text-align: left;
}

.ar-bgp-as {
  appearance: none;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ar-bgp-rpki {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.ar-bgp-rpki.is-valid { color: #047857; }
.ar-bgp-rpki.is-invalid { color: #b91c1c; }
.ar-bgp-rpki.is-unknown { color: #b45309; }

.ar-bgp-empty-row td {
  color: var(--bgp-muted);
  font-family: inherit;
  text-align: center !important;
  direction: rtl;
}

.ar-bgp-hist {
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  background: #f8fafc;
}

.ar-bgp-hist[hidden] { display: none !important; }

.ar-bgp-hist__head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--bgp-purple);
}

.ar-bgp-hist__first {
  font-family: var(--bgp-mono);
  color: var(--bgp-muted);
  font-weight: 700;
}

.ar-bgp-hist__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  direction: ltr;
}

.ar-bgp-hist__track li {
  flex: 0 0 auto;
  min-width: 5.8rem;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  border: 1px solid var(--bgp-line);
  background: #fff;
  border-inline-start: 3px solid var(--bgp-sky);
}

.ar-bgp-hist__track li.is-current {
  border-inline-start-color: var(--bgp-green);
}

.ar-bgp-hist__track .asn {
  display: block;
  font-family: var(--bgp-mono);
  font-size: 0.7rem;
  font-weight: 800;
}

.ar-bgp-hist__track .when {
  display: block;
  font-size: 0.6rem;
  color: var(--bgp-muted);
  font-family: var(--bgp-mono);
}

.ar-bgp-dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  margin: 0;
}

.ar-bgp-dl > div {
  border: 1px solid var(--bgp-line);
  border-radius: 7px;
  padding: 0.3rem 0.4rem;
}

.ar-bgp-dl dt {
  margin: 0 0 0.1rem;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--bgp-muted);
}

.ar-bgp-dl dd {
  margin: 0;
  font-family: var(--bgp-mono);
  font-size: 0.72rem;
  font-weight: 700;
  direction: ltr;
  text-align: left;
  word-break: break-word;
}

.ar-bgp-pre {
  margin: 0;
  max-height: 36vh;
  overflow: auto;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  background: #f8fafc;
  font-family: var(--bgp-mono);
  font-size: 0.7rem;
  line-height: 1.5;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
}

.ar-bgp-pathline {
  margin: 0 0 0.35rem;
  font-family: var(--bgp-mono);
  font-size: 0.68rem;
  color: var(--bgp-sky);
  direction: ltr;
  text-align: start;
}

.ar-bgp-tree {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.25rem;
  padding: 0.4rem;
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  background: #f8fafc;
  direction: ltr;
  max-height: 28vh;
  overflow: auto;
}

.ar-bgp-empty { margin: auto; color: var(--bgp-muted); font-size: 0.74rem; }

.ar-bgp-node {
  display: inline-flex;
  flex-direction: column;
  min-width: 6.2rem;
  max-width: 9rem;
  padding: 0.28rem 0.4rem;
  border-radius: 7px;
  background: #fff;
  border: 1px solid var(--bgp-line);
  border-inline-start: 3px solid var(--bgp-sky);
}

.ar-bgp-node.is-target { border-inline-start-color: var(--bgp-green); }
.ar-bgp-node.is-origin { border-inline-start-color: var(--bgp-purple); }

.ar-bgp-node__asn {
  font-family: var(--bgp-mono);
  font-size: 0.72rem;
  font-weight: 800;
}

.ar-bgp-node__name {
  font-size: 0.58rem;
  color: var(--bgp-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ar-bgp-arrow {
  display: inline-flex;
  align-items: center;
  color: var(--bgp-sky);
  font-weight: 800;
}

/* Phase 35 — Propagation Graph (compact, no horizontal scroll) */
.ar-bgp-graph__meta {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-family: var(--bgp-mono);
  color: var(--bgp-muted);
  direction: ltr;
  text-align: start;
}

.ar-bgp-graph {
  overflow: hidden;
  padding: 0.45rem 0.4rem 0.55rem;
  border: 1px solid var(--bgp-line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fcfbfe 0%, #ffffff 100%);
}

.ar-bgp-graph__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem 0.15rem;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  padding: 0.1rem;
}

.ar-bgp-graph__link {
  flex: 0 0 auto;
  width: 14px;
  height: 10px;
  color: #7c3aed;
  opacity: 0.65;
}

.ar-bgp-cap {
  appearance: none;
  border: 1.5px solid rgba(75, 0, 130, 0.4);
  background: #fff;
  color: var(--bgp-ink);
  border-radius: 999px;
  min-width: 0;
  max-width: 6.4rem;
  padding: 0.28rem 0.48rem;
  display: grid;
  gap: 0;
  justify-items: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  font: inherit;
}

.ar-bgp-cap:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(75, 0, 130, 0.1);
  border-color: var(--bgp-purple);
}

.ar-bgp-cap.is-origin {
  border-color: #10b981;
}

.ar-bgp-cap.is-upstream,
.ar-bgp-cap.is-peer {
  border-color: rgba(75, 0, 130, 0.5);
}

.ar-bgp-cap.is-peer {
  border-style: dashed;
  max-width: 5.2rem;
}

.ar-bgp-cap__asn {
  font-family: var(--bgp-mono);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ar-bgp-cap__name {
  display: none;
}

.ar-bgp-graph__peers {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.3rem;
  border-radius: 10px;
  border: 1px dashed rgba(75, 0, 130, 0.2);
  background: rgba(75, 0, 130, 0.03);
  max-width: 100%;
}

.ar-bgp-graph__peers-lbl {
  font-size: 0.52rem;
  font-weight: 800;
  color: var(--bgp-purple);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-inline-end: 0.15rem;
}

.ar-bgp-ptr {
  margin: 0;
  padding: 0.65rem;
  border: 1px solid var(--bgp-line);
  border-radius: 8px;
  font-family: var(--bgp-mono);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 800px) {
  .ar-bgp-dl { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ar-bgp-search { flex-direction: column; }
  .ar-bgp-run { width: 100%; }
  .ar-bgp-dl { grid-template-columns: 1fr; }
  .ar-bgp-status { width: 100%; margin-inline-start: 0; }
}
