/* Dashboard + docs responsive hardening (design spec) */
@media (max-width: 767px) {
  .rv-dash-root > .rv-sidebar {
    display: none !important;
  }
  .rv-dash-root.rv-sidebar-open > .rv-sidebar {
    display: flex !important;
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 45;
    width: 240px !important;
    max-width: 85vw;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
  }
  .rv-dash-root.rv-sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.6);
  }
  .rv-mobile-topbar {
    display: flex !important;
  }
  .rv-geo-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .rv-geo-main {
    grid-template-columns: 1fr !important;
  }
  .rv-geo-globe-card {
    min-height: 320px !important;
  }
  #rivet-globe-canvas {
    height: 320px !important;
  }
  .rv-geo-country-list {
    min-height: auto !important;
    max-height: 400px;
  }
  .rv-geo-country-rows {
    contain: paint;
    background: #0a120c;
    transform: translateZ(0);
  }
  .rv-geo-globe-card {
    contain: layout paint;
  }
  .rv-scanlines {
    left: 0 !important;
  }
}

@media (max-width: 479px) {
  .rv-geo-stats {
    grid-template-columns: 1fr !important;
  }
  .rv-geo-globe-card {
    min-height: 280px !important;
  }
  #rivet-globe-canvas {
    height: 280px !important;
  }
}

@media (min-width: 768px) {
  .rv-mobile-topbar {
    display: none !important;
  }
}

.rv-mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #08100a;
  border-bottom: 1px solid #17321f;
  position: sticky;
  top: 0;
  z-index: 25;
}

.rv-hamburger,
.rv-sidebar-close {
  border: 1px solid #1d4029;
  background: #060c08;
  color: #7fbf93;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 16px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}

/* Source + severity chips (not log level filters) */
.rv-chip-active:not([data-lvl]) {
  border-color: #39ff6e !important;
  background: rgba(57, 255, 110, 0.12) !important;
  color: #39ff6e !important;
}

/* Log level filter chips — border + per-level colors (INFO/OK/WARN/BLOCK) */
[data-lvl] {
  border: 1px solid #1d4029;
}

[data-lvl].rv-chip-lvl-active[data-lvl='INFO'] {
  border-color: #5fa9d6 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #5fa9d6 !important;
}

[data-lvl].rv-chip-lvl-active[data-lvl='OK'] {
  border-color: #39ff6e !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #39ff6e !important;
}

[data-lvl].rv-chip-lvl-active[data-lvl='WARN'] {
  border-color: #ffcc33 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ffcc33 !important;
}

[data-lvl].rv-chip-lvl-active[data-lvl='BLOCK'] {
  border-color: #ff5544 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ff5544 !important;
}

.rv-chip-inactive {
  border-color: #1d4029 !important;
  background: transparent !important;
  color: #4e8a60 !important;
}

.rv-control-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* Docs mobile sidebar */
@media (max-width: 767px) {
  .rv-docs-root > .rv-docs-sidebar {
    display: none !important;
  }
  .rv-docs-root.rv-sidebar-open > .rv-docs-sidebar {
    display: flex !important;
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 45;
    width: 248px !important;
    max-width: 88vw;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45);
  }
  .rv-docs-root.rv-sidebar-open::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.6);
  }
  .rv-docs-mobile-topbar {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .rv-docs-mobile-topbar {
    display: none !important;
  }
}

.rv-docs-mobile-topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #08100a;
  border-bottom: 1px solid #17321f;
  position: sticky;
  top: 0;
  z-index: 55;
}

/* GEO + Blocked IPs — shared panel hint (one style, no accent colors) */
.rv-geo-ip-hint {
  border: 1px solid #17321f;
  background: #0a120c;
  padding: 10px 14px;
  font-size: 11px;
  color: #c9ddc9;
  line-height: 1.6;
}

/* Hide Documentation sidebar arrow — external docs link */
.rv-sidebar a[href="/docs/"] > span:last-child {
  display: none;
}

/* Brand lockup — dashboard reference size (43px icon, 31px title) */
.rv-brand-link,
.rv-brand-link:visited,
.rv-brand-link:hover,
.rv-brand-link:active {
  text-decoration: none !important;
  color: inherit !important;
}
a.rv-brand-link .rv-brand-icon,
a.rv-brand-link .rv-brand-title,
a.rv-brand-link .rv-brand-sub {
  text-decoration: none !important;
}
.rv-brand-icon {
  width: 43px;
  height: 43px;
  flex: none;
  background: #39ff6e;
  color: #070b08;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 27px;
  box-shadow: 0 0 12px rgba(57, 255, 110, 0.5);
  position: relative;
  overflow: hidden;
}
.rv-brand-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.2) 0px,
    rgba(0, 0, 0, 0.2) 1px,
    transparent 1px,
    transparent 3px
  );
}
.rv-brand-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  flex: none;
}
.rv-brand-title {
  font-weight: 800;
  font-size: 31px;
  letter-spacing: 0.2em;
  color: #a9e8ba !important;
  text-shadow: 0 0 8px rgba(57, 255, 110, 0.35);
  line-height: 1;
  position: relative;
  white-space: nowrap;
}
.rv-brand-title::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.14) 0px,
    rgba(0, 0, 0, 0.14) 1px,
    transparent 1px,
    transparent 3px
  );
}
.rv-brand-sub {
  font-size: 17px;
  font-weight: 800;
  color: #4e8a60 !important;
  text-transform: uppercase;
  margin-top: 2px;
  line-height: 1;
  width: 100%;
  display: block;
  letter-spacing: 0;
  text-align: justify;
  text-align-last: justify;
  text-justify: inter-character;
}
@supports not (text-justify: inter-character) {
  .rv-brand-sub {
    letter-spacing: 0.34em;
  }
}

/* Docs code blocks — click to copy */
.rv-code-wrap {
  position: relative;
  margin: 0 0 13px;
}
.rv-code-wrap > div[style*='white-space:pre'],
.rv-code-wrap > div[style*='display:flex'] {
  margin-bottom: 0 !important;
  padding-right: 72px !important;
}
.rv-code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid #1d4029;
  background: rgba(8, 16, 10, 0.92);
  color: #7fbf93;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  cursor: pointer;
  z-index: 2;
}
.rv-code-copy:hover {
  border-color: #39ff6e;
  color: #39ff6e;
}

/* Docs — enlarged language switcher */
.rv-docs-lang {
  border-top: 1px solid #17321f;
  padding: 18px 16px 20px;
  overflow: visible;
}
.rv-docs-lang-label {
  font-size: 12px;
  color: #7fbf93;
  letter-spacing: 0.08em;
  margin: 0 0 12px 2px;
  padding-left: 2px;
  font-weight: 700;
  text-transform: uppercase;
  overflow: visible;
}
.rv-docs-lang-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.rv-docs-lang-links a,
.rv-docs-lang-links a:visited {
  font-size: 13px;
  padding: 8px 14px;
  letter-spacing: 0.08em;
  text-decoration: none !important;
  display: inline-block;
  border: 1px solid #1d4029;
  background: transparent;
  color: #7fbf93 !important;
}
.rv-docs-lang-links a.rv-lang-active {
  border-color: #39ff6e;
  background: rgba(57, 255, 110, 0.14);
  color: #39ff6e !important;
}

/* Sidebar logout — prominent */
.rv-logout-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 12px 14px;
  padding: 15px 18px !important;
  font-size: 14px !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none !important;
  text-transform: uppercase;
  color: #ff8a7a !important;
  background: rgba(255, 85, 68, 0.12);
  border: 1px solid rgba(255, 85, 68, 0.45) !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.rv-logout-btn:hover {
  color: #ff5544 !important;
  background: rgba(255, 85, 68, 0.22);
  border-color: #ff5544 !important;
}
