.ip-lookup-show .ip-lookup-hero-flag {
  width: 36px; /* token-ok */
  height: 27px; /* token-ok */
  background-size: cover;
  border-radius: var(--arp-radius-xs);
}

.ip-lookup-show .ip-lookup-address {
  font-family: var(--arp-font-mono);
  word-break: break-all;
}

.ip-lookup-show .ip-lookup-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--arp-space-3) var(--arp-space-5);
  align-items: baseline;
}

.ip-lookup-show .ip-lookup-dl dd {
  margin: 0;
  color: var(--arp-text-primary);
  word-break: break-word;
}

.ip-lookup-show .ip-lookup-dl code,
.ip-lookup-show .table code {
  font-family: var(--arp-font-mono);
  background: var(--arp-surface-muted);
  border: 1px solid var(--arp-border-subtle);
  border-radius: var(--arp-radius-xs);
  padding: var(--arp-space-0-5) var(--arp-space-2);
  color: var(--arp-text-primary);
}

.ip-lookup-show .ip-lookup-hint {
  display: block;
  color: var(--arp-text-muted);
  font-size: var(--bulma-size-small);
}

.ip-lookup-show .ip-lookup-range-bar {
  position: relative;
  height: var(--arp-space-2);
  margin-top: var(--arp-space-5);
  background: var(--arp-accent);
  border-radius: var(--arp-radius-full);
}

.ip-lookup-show .ip-lookup-range-marker {
  position: absolute;
  top: -5px; /* token-ok */
  width: 4px; /* token-ok */
  height: calc(100% + 10px); /* token-ok */
  background: var(--arp-text-primary);
  border-radius: var(--arp-radius-full);
  transform: translateX(-50%);
}

.ip-lookup-show .ip-lookup-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--arp-space-2);
  font-family: var(--arp-font-mono);
  font-size: var(--bulma-size-small);
  color: var(--arp-text-muted);
}

/* Cards in a row stretch to the tallest one; let the body grow so the
   timestamp footer stays at the bottom edge. */
.ip-lookup-show .lifecycle-card {
  display: flex;
  flex-direction: column;
}

.ip-lookup-show .lifecycle-card > .lifecycle-card-body {
  flex: 1;
}

.ip-lookup-show .lifecycle-card .table {
  margin-bottom: 0;
  background: transparent;
}

.ip-lookup-show .lifecycle-card .table td {
  vertical-align: middle;
  padding-left: var(--arp-space-4);
  padding-right: var(--arp-space-4);
}

.ip-lookup-show .ip-lookup-entities {
  display: flex;
  flex-direction: column;
  gap: var(--arp-space-6);
}

.ip-lookup-show .ip-lookup-entity-head {
  display: flex;
  align-items: flex-start;
  gap: var(--arp-space-3);
}

.ip-lookup-show .ip-lookup-entity-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px; /* token-ok */
  height: 44px; /* token-ok */
  border-radius: var(--arp-radius-md);
  background: var(--arp-accent-bg);
  color: var(--arp-accent);
  font-size: var(--bulma-size-5);
}

.ip-lookup-show .ip-lookup-entity-title {
  flex: 1;
  min-width: 0;
}

.ip-lookup-show .ip-lookup-entity-title > strong {
  margin-right: var(--arp-space-2);
  color: var(--arp-text-primary);
}

.ip-lookup-show .ip-lookup-entity-title .tags {
  margin-top: var(--arp-space-1);
  margin-bottom: 0;
}

.ip-lookup-show .ip-lookup-entity-title .tags .tag {
  margin-bottom: 0;
}

.ip-lookup-show .ip-lookup-entity code {
  font-family: var(--arp-font-mono);
  font-size: var(--bulma-size-small);
  background: var(--arp-surface-muted);
  border: 1px solid var(--arp-border-subtle);
  border-radius: var(--arp-radius-xs);
  padding: var(--arp-space-0-5) var(--arp-space-2);
  color: var(--arp-text-secondary);
}

.ip-lookup-show .ip-lookup-entity-details {
  display: flex;
  flex-direction: column;
  gap: var(--arp-space-1);
  margin-top: var(--arp-space-3);
  padding-left: calc(44px + var(--arp-space-3)); /* token-ok: aligns under the title, past the avatar */
  color: var(--arp-text-secondary);
}

.ip-lookup-show .ip-lookup-entity-details li {
  display: flex;
  align-items: baseline;
  gap: var(--arp-space-2);
  word-break: break-word;
}

.ip-lookup-show .ip-lookup-entity-details .icon {
  flex-shrink: 0;
  color: var(--arp-text-muted);
}

.ip-lookup-show .ip-lookup-entity-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--arp-space-4);
  margin-top: var(--arp-space-4);
  padding-left: calc(44px + var(--arp-space-3)); /* token-ok: aligns under the title, past the avatar */
}

/* A nested contact renders as its own small card. */
.ip-lookup-show .ip-lookup-entity-contacts .ip-lookup-entity {
  padding: var(--arp-space-4);
  background: var(--arp-surface-muted);
  border: 1px solid var(--arp-border);
  border-radius: var(--arp-radius-md);
}

.ip-lookup-show .ip-lookup-entity-contacts .ip-lookup-entity-avatar {
  width: 32px; /* token-ok */
  height: 32px; /* token-ok */
  font-size: var(--bulma-size-6);
  background: var(--arp-surface-sunken);
  color: var(--arp-text-secondary);
}

.ip-lookup-show .ip-lookup-entity-contacts .ip-lookup-entity.is-abuse {
  border-left: 3px solid var(--arp-status-danger-border); /* token-ok */
}

.ip-lookup-show .ip-lookup-entity-contacts .is-abuse .ip-lookup-entity-avatar {
  background: var(--arp-status-danger-bg);
  color: var(--arp-status-danger-fg);
}

.ip-lookup-show .ip-lookup-entity-contacts .ip-lookup-entity-details,
.ip-lookup-show .ip-lookup-entity-contacts .ip-lookup-entity-contacts {
  padding-left: 0;
}

@media screen and (max-width: 768px) {
  .ip-lookup-show .ip-lookup-entity-details,
  .ip-lookup-show .ip-lookup-entity-contacts {
    padding-left: 0;
  }
}

.ip-lookup-show .ip-lookup-link {
  word-break: break-all;
}

.ip-lookup-show .ip-lookup-raw-json-body {
  position: relative;
}

.ip-lookup-show .ip-lookup-raw-json-copy {
  position: absolute;
  top: var(--arp-space-6);
  right: var(--arp-space-6);
}

.ip-lookup-show .ip-lookup-raw-json {
  max-height: 30rem;
  overflow: auto;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
