/* APPVLR outage overlay (v47-size-keep). Theme tokens only, so Dark, Light and
   Charcoal all work. Calm motion: one slow orbit and a soft pulse, 120-200 ms
   transitions, nothing else. prefers-reduced-motion turns all motion off. */
.appvlr-outage {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 16px;
  background: rgb(var(--shade-rgb, 0 0 0) / 0.6);
  opacity: 0;
  transition: opacity 180ms ease-out;
  overflow: hidden;
}

.appvlr-outage[hidden] {
  display: none;
}

.appvlr-outage.is-open {
  opacity: 1;
}

.appvlr-outage-card {
  box-sizing: border-box;
  width: min(400px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 24px 20px 20px;
  border: 1px solid var(--border, #242c38);
  border-radius: 14px;
  background: var(--surface-raised, #151b24);
  color: var(--text, #dce1e8);
  text-align: center;
  box-shadow: 0 16px 40px rgb(var(--shade-rgb, 0 0 0) / 0.35);
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  transform: translateY(4px);
  transition: transform 160ms ease-out;
}

.appvlr-outage.is-open .appvlr-outage-card {
  transform: translateY(0);
}

.appvlr-outage-mark {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appvlr-outage-mark img {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  display: block;
}

/* The ring: a thin arc that orbits the mark, with a soft pulse. */
.appvlr-outage-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(var(--accent-rgb, 46 127 242) / 0.18);
  border-top-color: var(--accent, #2e7ff2);
  animation:
    appvlr-outage-orbit 3.2s linear infinite,
    appvlr-outage-pulse 2.4s ease-in-out infinite;
}

.appvlr-outage.is-back .appvlr-outage-ring {
  border-top-color: var(--accent, #2e7ff2);
  animation: none;
  border-color: var(--accent, #2e7ff2);
}

@keyframes appvlr-outage-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes appvlr-outage-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.appvlr-outage-title {
  margin: 0 0 8px;
  color: var(--text-strong, #ffffff);
  font: 700 20px/1.25 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.appvlr-outage-body {
  margin: 0 0 14px;
  color: var(--text-muted, #8d96a2);
}

.appvlr-outage-status {
  margin: 0 0 18px;
  color: var(--text-muted, #8d96a2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.appvlr-outage-retry {
  min-height: 44px;
  min-width: 120px;
  padding: 8px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent-button, #2a74de);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}

.appvlr-outage-retry:hover {
  background: var(--accent-button-highlight, #3576d1);
}

.appvlr-outage-retry:focus-visible {
  outline: 2px solid var(--focus, #dce1e8);
  outline-offset: 2px;
}

.appvlr-outage-retry:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* Two actions side by side: Try now, then Keep working. */
.appvlr-outage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.appvlr-outage-keep {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--border, #242c38);
  border-radius: 10px;
  background: transparent;
  color: var(--text, #dce1e8);
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease-out;
}

.appvlr-outage-keep:hover {
  background: var(--surface-hover, rgb(255 255 255 / 0.06));
}

.appvlr-outage-keep:focus-visible {
  outline: 2px solid var(--focus, #dce1e8);
  outline-offset: 2px;
}

/* Banner mode: a strip at the top. The page under it stays usable. */
.appvlr-outage.is-banner {
  inset: 0 0 auto 0;
  padding: 8px 16px;
  background: none;
  pointer-events: none;
}

.appvlr-outage.is-banner .appvlr-outage-card {
  pointer-events: auto;
  width: min(760px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
}

.appvlr-outage.is-banner .appvlr-outage-mark {
  width: 28px;
  height: 28px;
  margin: 0;
  flex: none;
}

.appvlr-outage.is-banner .appvlr-outage-mark img {
  width: 18px;
  height: 18px;
}

.appvlr-outage.is-banner .appvlr-outage-title {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.appvlr-outage.is-banner .appvlr-outage-body,
.appvlr-outage.is-banner .appvlr-outage-keep {
  display: none;
}

.appvlr-outage.is-banner .appvlr-outage-status {
  margin: 0;
  flex: 1;
  font-size: 12px;
}

.appvlr-outage.is-banner .appvlr-outage-retry {
  min-height: 32px;
  min-width: 0;
  padding: 4px 12px;
}

@media (max-width: 480px) {
  .appvlr-outage-card {
    padding: 20px 16px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .appvlr-outage,
  .appvlr-outage-card,
  .appvlr-outage-retry,
  .appvlr-outage-keep {
    transition: none;
  }

  .appvlr-outage-ring {
    animation: none;
    border-top-color: rgb(var(--accent-rgb, 46 127 242) / 0.18);
    opacity: 1;
  }
}
