.nano-waiting-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1.5rem 3.5rem;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.55) 45%,
    rgba(0, 0, 0, 0.72) 100%
  );
  pointer-events: none;
}

.nano-waiting-overlay[hidden] {
  display: none;
}

.nano-waiting-content {
  display: grid;
  gap: 0.85rem;
  max-width: 32rem;
  width: 100%;
  text-align: center;
  pointer-events: auto;
}

.nano-waiting-headline {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--accent-strong, #b5ffd0);
  letter-spacing: 0.02em;
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.35);
}

.nano-waiting-detail {
  margin: 0;
  min-height: 2.6rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(240, 255, 244, 0.82);
  transition: opacity 400ms ease;
}

.nano-waiting-detail.is-fading {
  opacity: 0;
}

.nano-waiting-status {
  margin: 0;
  min-height: 1.25rem;
  font: 500 0.82rem/1.4 "Cascadia Mono", "Consolas", monospace;
  color: var(--accent, #39ff14);
  letter-spacing: 0.04em;
}

.nano-waiting-status::after {
  content: "";
  animation: nano-waiting-dots 1.4s steps(4, end) infinite;
}

@keyframes nano-waiting-dots {
  0% {
    content: "";
  }
  25% {
    content: ".";
  }
  50% {
    content: "..";
  }
  75% {
    content: "...";
  }
}

body.connection-waiting .view-modal {
  z-index: 1050;
}

.nano-reconnect-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.78);
  padding: 1rem;
}

.nano-reconnect-overlay[hidden] {
  display: none;
}

.nano-reconnect-panel {
  width: min(28rem, 100%);
  display: grid;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: #111;
  color: #f5f5f5;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.nano-reconnect-panel h2 {
  margin: 0;
  font-size: 1.25rem;
}

.nano-reconnect-panel p {
  margin: 0;
  color: #c8c8c8;
}

.nano-reconnect-status {
  min-height: 1.25rem;
  font-size: 0.9rem;
  color: #9fd0ff;
}

.nano-reconnect-actions {
  display: flex;
  justify-content: flex-end;
}

.nano-reconnect-actions button {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: #2f6fed;
  color: #fff;
  cursor: pointer;
}
