/* 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;
}

/* Sticky top banner */
.vm-overlay {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #cf222e;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.vm-overlay.hidden { display: none; }

.vm-overlay-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  max-width: 1400px;
  margin: 0 auto;
}
.vm-overlay-icon {
  font-size: 18px;
  flex: 0 0 auto;
}
.vm-overlay-card h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  flex: 0 0 auto;
}
.vm-overlay-card p {
  margin: 0;
  font-size: 13px;
  opacity: .9;
  flex: 1 1 auto;
}
.vm-overlay-card .btn-primary {
  background: #fff;
  color: #cf222e;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}
.vm-overlay-card .btn-primary:hover { background: #f6f8fa; }
.vm-overlay-card .btn-primary i { margin-right: 4px; }

.vm-overlay-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.vm-overlay-progress .google-loader {
  display: flex; gap: 4px;
}
.vm-overlay-progress .google-loader .dot {
  background: #fff;
  width: 6px; height: 6px;
}
.vm-overlay-progress p { margin: 0; font-size: 13px; }

.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);
}
