/* Visitor overview: a compact route from context to action. */
#visitor-overview {
  overflow: hidden;
}

#visitor-overview .item-headline {
  margin-bottom: 14px;
}

.visitor-panel {
  position: relative;
  isolation: isolate;
  color: rgba(255, 255, 255, 0.96);
}

.visitor-panel::before {
  position: absolute;
  z-index: -1;
  top: -66px;
  right: -48px;
  width: 156px;
  height: 156px;
  border: 1px solid rgba(232, 214, 164, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(155, 201, 172, 0.05), 0 0 0 44px rgba(223, 127, 98, 0.035);
  content: '';
  pointer-events: none;
}

.visitor-status {
  display: flex;
  align-items: center;
  min-height: 24px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
  line-height: 1.35;
}

.visitor-status-dot {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #9bc9ac;
  box-shadow: 0 0 0 4px rgba(155, 201, 172, 0.14), 0 0 10px rgba(155, 201, 172, 0.65);
  animation: visitorSignal 2.2s ease-out infinite;
}

.visitor-badge {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid rgba(232, 214, 164, 0.42);
  border-radius: 999px;
  color: #e8d6a4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(232, 214, 164, 0.08);
}

.visitor-primary {
  display: grid;
  gap: 4px;
  margin: 16px 0 14px;
}

.visitor-primary span,
.visitor-route-meta span,
.visitor-clock span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.75rem;
}

.visitor-primary span i {
  margin-right: 3px;
  color: #9bc9ac;
}

.visitor-primary strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-route {
  position: relative;
  padding: 11px 12px 9px;
  border: 1px solid rgba(155, 201, 172, 0.25);
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(22, 59, 56, 0.3), rgba(63, 116, 108, 0.12));
  overflow: hidden;
}

.visitor-route::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(232, 214, 164, 0.08));
  content: '';
  pointer-events: none;
}

.visitor-route-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.visitor-route-meta strong {
  color: #fff;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.visitor-route-line {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 8px;
  align-items: center;
  margin: 10px 1px 4px;
}

.visitor-route-line i {
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 2px solid #9bc9ac;
  border-radius: 50%;
  background: #163b38;
  box-shadow: 0 0 0 3px rgba(155, 201, 172, 0.12);
}

.visitor-route-line i:last-child {
  border-color: #e8d6a4;
  box-shadow: 0 0 0 3px rgba(232, 214, 164, 0.12), 0 0 12px rgba(232, 214, 164, 0.34);
}

.visitor-route-line span {
  height: 1px;
  background: repeating-linear-gradient(90deg, #9bc9ac 0 7px, transparent 7px 12px);
  background-size: 24px 1px;
  animation: visitorRoute 1.6s linear infinite;
}

.visitor-route-labels {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.7rem;
}

.visitor-command {
  display: grid;
  grid-template-columns: minmax(70px, 0.72fr) minmax(0, 1.28fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
}

.visitor-clock {
  display: grid;
  align-content: center;
  gap: 1px;
  padding-left: 4px;
}

.visitor-clock strong {
  color: #fff;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.visitor-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
}

#aside-content .visitor-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(232, 214, 164, 0.32);
  border-radius: 10px;
  background: rgba(232, 214, 164, 0.1);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#aside-content .visitor-actions .visitor-action-primary {
  justify-content: space-between;
  padding-left: 11px;
}

#aside-content .visitor-actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(223, 127, 98, 0.78);
  background: rgba(223, 127, 98, 0.42);
}

.visitor-actions a i {
  color: #e8d6a4;
  font-style: normal;
  transition: transform 0.2s ease;
}

.visitor-actions a:hover i {
  transform: translateX(2px);
}

.visitor-privacy {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.72rem;
  line-height: 1.4;
}

.visitor-panel:not(.is-ready) #visitor-location {
  animation: visitorPulse 1.4s ease-in-out infinite;
}

@keyframes visitorPulse {
  50% { opacity: 0.45; }
}

@keyframes visitorSignal {
  0%, 45% { box-shadow: 0 0 0 3px rgba(155, 201, 172, 0.16), 0 0 9px rgba(155, 201, 172, 0.56); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(155, 201, 172, 0), 0 0 12px rgba(155, 201, 172, 0.2); }
}

@keyframes visitorRoute {
  to { background-position: 24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .visitor-status-dot,
  .visitor-route-line span,
  .visitor-panel:not(.is-ready) #visitor-location {
    animation: none;
  }
}

@media screen and (max-width: 900px) {
  .visitor-command {
    grid-template-columns: minmax(70px, 0.72fr) minmax(0, 1.28fr);
  }
}
