/* Status chip — matches .btn-refresh / .btn-notification visual language
   (white bg, 1px gray border, 8px radius, 40px height, subtle shadow)
   but wider with a colored dot + label so state is glanceable. */
.vm-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  margin-left: 0.5rem;
}
.vm-pill:hover  { background: #f9fafb; border-color: #d1d5db; color: #1f2937; }
.vm-pill:active { transform: scale(0.97); }

.vm-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  flex: 0 0 8px;
}

/* State coloring — keep the chip neutral, color the dot + a left accent border */
.vm-pill--running  { border-left: 3px solid #2ea043; padding-left: 10px; }
.vm-pill--running  .vm-pill-dot { background: #2ea043; box-shadow: 0 0 6px rgba(46,160,67,.55); }

.vm-pill--stopped  { border-left: 3px solid #cf222e; padding-left: 10px; color: #991b1b; }
.vm-pill--stopped  .vm-pill-dot { background: #cf222e; }

.vm-pill--pending,
.vm-pill--warming,
.vm-pill--stopping { border-left: 3px solid #d29922; padding-left: 10px; color: #92400e; }
.vm-pill--pending  .vm-pill-dot,
.vm-pill--warming  .vm-pill-dot,
.vm-pill--stopping .vm-pill-dot { background: #d29922; animation: vmPulse 1s infinite; }

.vm-pill--mixed    { border-left: 3px solid #8250df; padding-left: 10px; }
.vm-pill--mixed    .vm-pill-dot { background: #8250df; }

.vm-pill--unknown  .vm-pill-dot { background: #9ca3af; }

@keyframes vmPulse { 50% { opacity: .25; } }

/* Light visual cue when env is down — files stay readable */
body.env-down main.container {
  filter: grayscale(40%) opacity(0.85);
  transition: filter .2s;
}

/* Full-screen "asleep" screensaver shown when the env is down */
.vm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: vmFadeIn .4s ease;
}
.vm-overlay.hidden { display: none; }

.vm-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  text-align: center;
  padding: 40px;
}

/* env logo — the screensaver centerpiece */
.vm-overlay-logo {
  max-width: 260px;
  max-height: 150px;
  object-fit: contain;
  opacity: .96;
  animation: vmFloat 5s ease-in-out infinite, vmGlow 4s ease-in-out infinite;
}
.vm-overlay--still .vm-overlay-logo { animation: vmGlow 4s ease-in-out infinite; }
.vm-overlay--none  .vm-overlay-logo { animation: none; }
.vm-overlay-icon { display: none; }   /* legacy glyph, unused in screensaver */

.vm-overlay-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .2px;
}
.vm-overlay-card p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,.55);
  max-width: 360px;
  line-height: 1.5;
}

/* Power-on button — circular, softly pulsing */
.vm-overlay-card .btn-primary {
  margin-top: 4px;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.35);
  font-size: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: vmPowerPulse 2.6s ease-in-out infinite;
}
.vm-overlay-card .btn-primary:hover {
  background: rgba(255,255,255,.14);
  border-color: #fff;
  transform: scale(1.06);
  box-shadow: 0 0 0 6px rgba(255,255,255,.06);
}
.vm-overlay-card .btn-primary i { margin: 0; }

.vm-overlay-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.vm-overlay-progress .google-loader { display: flex; gap: 5px; }
.vm-overlay-progress .google-loader .dot { background: #fff; width: 7px; height: 7px; }
.vm-overlay-progress p { margin: 0; font-size: 13px; color: rgba(255,255,255,.55); }

@keyframes vmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes vmFloat {
  0%, 100% { transform: translateY(-8px); }
  50%      { transform: translateY(8px); }
}
@keyframes vmGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,255,255,.10)); }
  50%      { filter: drop-shadow(0 0 22px rgba(255,255,255,.28)); }
}
@keyframes vmPowerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.16); }
  70%      { box-shadow: 0 0 0 12px rgba(255,255,255,0); }
}

.vm-overlay.hidden,
#vmOverlayProgress.hidden,
#vmOverlayStartBtn.hidden { display: none !important; }

/* Toast shown when user clicks cached content while env is down */
.vm-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2328;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10000;
}
.vm-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
