:root {
  --echo-overlay-cyan: #48d7ff;
  --echo-overlay-blue: #0d7fff;
  --echo-overlay-ink: #020714;
  --echo-overlay-panel: rgba(1, 8, 18, 0.94);
  --echo-overlay-text: #eaf9ff;
  --echo-overlay-corner-top: max(28px, env(safe-area-inset-top, 0px));
  --echo-overlay-corner-right: max(28px, env(safe-area-inset-right, 0px));
  --echo-overlay-corner-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  --echo-overlay-corner-left: max(28px, env(safe-area-inset-left, 0px));
}

.floating-site-menu,
.echo-display-gear:not(.echo-overlay-gear),
.echoDisplayGear,
.echostream-launcher-with-badge,
.echostream-log-menu-button,
.echo-map-menu-button {
  display: none !important;
}

.echo-overlay-hidden {
  display: none !important;
}

body:has(.landingShell) .echo-overlay-shell {
  display: none !important;
}

.echo-overlay-shell,
.echo-overlay-shell * {
  box-sizing: border-box;
}

.echo-overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: none;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.echo-overlay-launcher,
.echo-overlay-backdrop,
.echo-overlay-profile,
.echo-overlay-profile *,
.echo-overlay-quick-stack,
.echo-overlay-quick-stack *,
.echo-overlay-gear,
.echo-overlay-gear *,
.echo-overlay-pop.echo-overlay-open,
.echo-overlay-pop.echo-overlay-open * {
  pointer-events: auto;
}

.echo-overlay-launcher {
  position: fixed;
  left: var(--echo-overlay-corner-left);
  top: var(--echo-overlay-corner-top);
  width: 76px;
  height: 76px;
  border: 2px solid rgba(72, 215, 255, 0.86);
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  background: #020714;
  box-shadow: 0 0 22px rgba(72, 215, 255, 0.76), 0 0 46px rgba(13, 127, 255, 0.28);
  cursor: pointer;
}

.echo-overlay-launcher img,
.echo-overlay-quick-button img,
.echo-overlay-site img,
.echo-overlay-gear-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.echo-overlay-backdrop {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(13, 127, 255, 0.22), transparent 36%),
    linear-gradient(135deg, rgba(0, 0, 10, 0.9), rgba(1, 14, 32, 0.92));
  transition: opacity 180ms ease;
}

.echo-overlay-menu-open .echo-overlay-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.echo-overlay-radial {
  position: fixed;
  inset: 0;
  display: block;
  padding: 0;
  transform: scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.echo-overlay-radial,
.echo-overlay-radial * {
  pointer-events: none;
}

.echo-overlay-menu-open .echo-overlay-radial {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.echo-overlay-menu-open .echo-overlay-radial,
.echo-overlay-menu-open .echo-overlay-radial * {
  pointer-events: auto;
}

.echo-overlay-radial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/echoboard-section-menu-bg.png") center / min(76vmin, 760px) auto no-repeat;
  opacity: 0.28;
  filter: drop-shadow(0 0 34px rgba(72, 215, 255, 0.32));
  pointer-events: none;
}

.echo-overlay-notifications {
  position: fixed;
  left: 50vw;
  bottom: max(28px, calc(var(--echo-overlay-corner-bottom) + 8px));
  z-index: 3;
  width: min(980px, calc(100vw - 56px));
  height: min(40vh, 410px);
  transform: translateX(-50%);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(126, 232, 255, 0.66);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 215, 255, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(2, 13, 31, 0.96), rgba(0, 3, 13, 0.97));
  box-shadow:
    0 24px 90px rgba(0, 0, 0, 0.52),
    0 0 34px rgba(72, 215, 255, 0.24),
    inset 0 0 24px rgba(72, 215, 255, 0.08);
  color: #f2fbff;
  overflow: hidden;
}

.echo-overlay-notifications > header {
  display: grid;
  gap: 4px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(72, 215, 255, 0.22);
  background: linear-gradient(135deg, rgba(4, 25, 56, 0.92), rgba(0, 5, 18, 0.96));
}

.echo-overlay-notifications > header span,
.echo-overlay-notifications > header small,
.echo-overlay-notification-group h3 {
  color: #76f0ff;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.echo-overlay-notifications > header strong {
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.05;
}

.echo-overlay-notification-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
}

.echo-overlay-notification-group {
  display: grid;
  gap: 8px;
}

.echo-overlay-notification-group + .echo-overlay-notification-group {
  margin-top: 14px;
}

.echo-overlay-notification-group h3 {
  margin: 0;
  color: #dff8ff;
}

.echo-overlay-note {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  min-height: 64px;
  padding: 11px 12px;
  border: 1px solid rgba(72, 215, 255, 0.28);
  border-radius: 8px;
  background: rgba(1, 8, 22, 0.84);
  color: #dff8ff;
  text-decoration: none;
  box-shadow: inset 0 0 14px rgba(72, 215, 255, 0.08);
}

.echo-overlay-note > span {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: #48d7ff;
  box-shadow: 0 0 12px rgba(72, 215, 255, 0.8);
}

.echo-overlay-note strong,
.echo-overlay-note small {
  display: block;
  line-height: 1.08;
}

.echo-overlay-note strong {
  color: #ffffff;
  font-size: 0.82rem;
}

.echo-overlay-note small {
  margin-top: 4px;
  color: #9bc8e8;
  font-size: 0.72rem;
}

.echo-overlay-app-grid {
  position: fixed;
  left: calc(50vw - 162px);
  top: max(54px, calc(var(--echo-overlay-corner-top) + 48px));
  z-index: 2;
  width: min(324px, calc(100vw - 180px));
  max-height: calc(50vh - 18px);
  display: grid;
  align-content: start;
  gap: 6px;
  pointer-events: none;
}

.echo-overlay-app-row {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.echo-overlay-primary-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.echo-overlay-admin-row {
  position: fixed;
  right: calc(max(28px, calc(50vw - min(490px, calc((100vw - 56px) / 2)))) + 336px);
  bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 8px)) + min(40vh, 410px) + 10px);
  width: 76px;
  display: flex;
  justify-content: flex-start;
}

.echo-overlay-admin-row .echo-overlay-site {
  width: 76px;
}

.echo-overlay-witness-row {
  display: flex;
  justify-content: center;
}

.echo-overlay-witness-row .echo-overlay-site {
  width: calc((100% - 6px) / 2);
}

.echo-overlay-compact-row {
  position: fixed;
  right: calc(max(28px, calc(50vw - min(490px, calc((100vw - 56px) / 2)))) + 68px);
  bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 8px)) + min(40vh, 410px) + 10px);
  display: grid;
  grid-template-columns: repeat(4, 76px);
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.echo-overlay-compact-row .echo-overlay-site {
  width: 76px;
  border-radius: 10px;
}

.echo-overlay-syncrotel-launcher {
  position: fixed;
  right: max(28px, calc(50vw - min(490px, calc((100vw - 56px) / 2))));
  bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 8px)) + min(40vh, 410px) + 10px);
  width: 58px;
  z-index: 3;
}

.echo-overlay-syncrotel-launcher .echo-overlay-site {
  width: 58px;
  border-radius: 50%;
}

.echo-overlay-site {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition: opacity 150ms ease, transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 150ms ease, box-shadow 150ms ease;
  transition-delay: var(--echo-overlay-delay, 0ms);
  border: 2px solid rgba(72, 215, 255, 0.86);
  border-radius: 10px;
  overflow: hidden;
  background: #020714;
  box-shadow: 0 0 20px rgba(72, 215, 255, 0.56), inset 0 0 18px rgba(72, 215, 255, 0.08);
  color: transparent;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  appearance: none;
}

.echo-overlay-site.echo-overlay-featured {
  border-width: 2px;
}

.echo-overlay-site[data-app-id="witnessdeskmedia"] {
  border-color: rgba(255, 255, 235, 0.92);
  box-shadow:
    0 0 18px rgba(255, 255, 235, 0.5),
    0 0 34px rgba(72, 215, 255, 0.34),
    inset 0 0 18px rgba(255, 255, 235, 0.08);
}

.echo-overlay-site[data-app-id="witnessdeskmedia"] img {
  filter:
    drop-shadow(0 0 10px rgba(255, 255, 235, 0.78))
    drop-shadow(0 0 18px rgba(72, 215, 255, 0.32));
}

.echo-overlay-site[data-fallback="true"] {
  display: grid;
  place-items: center;
  color: #eaf9ff;
  font-weight: 900;
  font-size: 24px;
}

.echo-overlay-site-label {
  display: none;
}

.echo-overlay-menu-open .echo-overlay-site {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.echo-overlay-site-disabled,
.echo-overlay-site:disabled {
  border-color: rgba(122, 143, 158, 0.52);
  background: #060b12;
  box-shadow: inset 0 0 18px rgba(122, 143, 158, 0.08);
  cursor: not-allowed;
}

.echo-overlay-site-disabled img,
.echo-overlay-site:disabled img {
  filter: grayscale(1) brightness(0.56) contrast(0.9);
  opacity: 0.66;
}

.echo-overlay-site-disabled[data-fallback="true"],
.echo-overlay-site:disabled[data-fallback="true"] {
  color: rgba(218, 228, 236, 0.52);
}

.echo-overlay-menu-open .echo-overlay-site-disabled,
.echo-overlay-menu-open .echo-overlay-site:disabled {
  opacity: 0.36;
  transform: translateY(0) scale(0.96);
}

.echo-overlay-profile {
  position: fixed;
  right: var(--echo-overlay-corner-right);
  top: var(--echo-overlay-corner-top);
  pointer-events: auto;
}

.echo-overlay-profile-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(72, 215, 255, 0.8);
  border-radius: 50%;
  color: #aef0ff;
  background: radial-gradient(circle, rgba(72, 215, 255, 0.22), rgba(1, 8, 18, 0.92) 62%);
  box-shadow: 0 0 24px rgba(72, 215, 255, 0.58);
  font-weight: 900;
  font-size: 22px;
  cursor: pointer;
}

.echo-overlay-profile-button img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.echo-overlay-profile-button-has-photo {
  background: #010812;
}

.echo-overlay-profile-panel,
.echo-overlay-gear-panel {
  position: absolute;
  right: 0;
  display: none;
  min-width: 230px;
  padding: 12px;
  border: 1px solid rgba(72, 215, 255, 0.42);
  border-radius: 14px;
  background: rgba(1, 8, 18, 0.94);
  color: #eaf9ff;
  box-shadow: 0 0 26px rgba(72, 215, 255, 0.32);
}

.echo-overlay-profile:hover .echo-overlay-profile-panel,
.echo-overlay-profile:focus-within .echo-overlay-profile-panel,
.echo-overlay-gear:hover .echo-overlay-gear-panel,
.echo-overlay-gear:focus-within .echo-overlay-gear-panel {
  display: grid;
  gap: 8px;
}

.echo-overlay-profile-panel {
  top: 96px;
}

.echo-overlay-profile-panel strong,
.echo-overlay-gear-panel strong {
  color: #ffffff;
}

.echo-overlay-profile-panel a,
.echo-overlay-profile-panel button,
.echo-overlay-gear-panel button {
  width: 100%;
  border: 1px solid rgba(72, 215, 255, 0.36);
  border-radius: 8px;
  padding: 8px 10px;
  color: #eaf9ff;
  background: rgba(3, 19, 40, 0.9);
  text-decoration: none;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.echo-overlay-quick-stack {
  position: fixed;
  left: var(--echo-overlay-corner-left);
  bottom: var(--echo-overlay-corner-bottom);
  display: grid;
  gap: 12px;
  pointer-events: auto;
}

.echo-overlay-quick-button {
  position: relative;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(72, 215, 255, 0.78);
  border-radius: 16px;
  overflow: visible;
  padding: 0;
  background: rgba(1, 8, 18, 0.8);
  box-shadow: 0 0 22px rgba(72, 215, 255, 0.58);
  cursor: pointer;
}

.echo-overlay-quick-button img {
  border-radius: inherit;
}

.echo-overlay-map-button {
  border-color: rgba(105, 255, 108, 0.86);
  box-shadow: 0 0 22px rgba(105, 255, 108, 0.52);
}

.echo-overlay-badge {
  position: absolute;
  left: calc(100% + 6px);
  top: -8px;
  z-index: 2;
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #00101a;
  background: #48d7ff;
  border: 2px solid #ffffff;
  font-weight: 950;
  font-size: 12px;
  box-shadow: 0 0 14px rgba(72, 215, 255, 0.88);
}

.echo-overlay-gear {
  position: fixed;
  right: var(--echo-overlay-corner-right);
  bottom: var(--echo-overlay-corner-bottom);
  pointer-events: auto;
}

.echo-overlay-gear-button {
  width: 88px;
  height: 88px;
  border: 1px solid rgba(180, 204, 218, 0.7);
  border-radius: 50%;
  overflow: hidden;
  padding: 0;
  opacity: 0.82;
  background: rgba(1, 8, 18, 0.62);
  box-shadow: 0 0 24px rgba(180, 204, 218, 0.36);
  cursor: pointer;
}

.echo-overlay-gear-panel {
  right: 4px;
  bottom: 98px;
}

.echo-overlay-pop {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.echo-overlay-pop.echo-overlay-open {
  display: grid;
}

.echo-overlay-pop-card {
  width: calc(100vw - 96px);
  height: calc(100vh - 96px);
  border: 1px solid rgba(72, 215, 255, 0.52);
  border-radius: 16px;
  overflow: hidden;
  background: #020714;
  box-shadow: 0 0 34px rgba(72, 215, 255, 0.4);
}

.echo-overlay-pop-head {
  position: relative;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #eaf9ff;
  background: #001a32;
}

.echo-overlay-pop-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.echo-overlay-pop-close {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.echo-overlay-pop-head button,
.echo-overlay-pop-head a {
  border: 1px solid rgba(72, 215, 255, 0.5);
  border-radius: 8px;
  padding: 7px 10px;
  color: #eaf9ff;
  background: rgba(0, 0, 0, 0.42);
  text-decoration: none;
  font-weight: 800;
}

.echo-overlay-pop iframe {
  width: 100%;
  height: calc(100% - 48px);
  border: 0;
  background: #020714;
}

@media (max-width: 760px) {
  :root {
    --echo-overlay-corner-top: max(18px, env(safe-area-inset-top, 0px));
    --echo-overlay-corner-right: max(14px, env(safe-area-inset-right, 0px));
    --echo-overlay-corner-bottom: max(14px, env(safe-area-inset-bottom, 0px));
    --echo-overlay-corner-left: max(14px, env(safe-area-inset-left, 0px));
  }

  .echo-overlay-launcher {
    width: 68px;
    height: 68px;
  }

  .echo-overlay-profile-button,
  .echo-overlay-gear-button {
    width: 68px;
    height: 68px;
    font-size: 18px;
  }

  .echo-overlay-radial {
    padding: 0;
  }

  .echo-overlay-app-grid {
    top: max(84px, calc(var(--echo-overlay-corner-top) + 64px));
    left: calc(50vw - 156px);
    width: min(312px, calc(100vw - 26px));
    max-height: calc(50vh - 18px);
    gap: 6px;
  }

  .echo-overlay-app-row {
    gap: 6px;
  }

  .echo-overlay-primary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .echo-overlay-admin-row .echo-overlay-site {
    width: 64px;
  }

  .echo-overlay-compact-row {
    grid-template-columns: repeat(4, 64px);
    gap: 7px;
    left: auto;
    right: calc(max(12px, env(safe-area-inset-right, 0px)) + 58px);
  }

  .echo-overlay-compact-row .echo-overlay-site {
    width: 64px;
  }

  .echo-overlay-admin-row {
    left: auto;
    right: calc(max(12px, env(safe-area-inset-right, 0px)) + 284px);
    bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 18px)) + min(40vh, 410px) + 8px);
    width: 64px;
  }

  .echo-overlay-compact-row {
    bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 18px)) + min(40vh, 410px) + 8px);
  }

  .echo-overlay-syncrotel-launcher {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(max(28px, calc(var(--echo-overlay-corner-bottom) + 18px)) + min(40vh, 410px) + 8px);
    width: 50px;
  }

  .echo-overlay-syncrotel-launcher .echo-overlay-site {
    width: 50px;
  }

  .echo-overlay-site,
  .echo-overlay-site.echo-overlay-featured {
    min-height: 0;
  }

  .echo-overlay-notifications {
    width: min(100%, calc(100vw - 96px));
    height: min(44vh, 420px);
    bottom: max(28px, calc(var(--echo-overlay-corner-bottom) + 18px));
    margin-left: 74px;
  }

  .echo-overlay-quick-button {
    width: 62px;
    height: 62px;
  }

  .echo-overlay-pop-card {
    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
    border-radius: 10px;
  }

}
