/* Scheduler status styling: color the status surfaces, not their icons. */
.scheduler-live-banner {
  display: block;
}

.scheduler-live-icon,
.scheduler-live-pulse {
  display: none !important;
}

.top-actions .status-pill::before,
.top-actions .status-pill i {
  display: none !important;
}

.top-actions .status-pill.state-running {
  color: #8ef5cf;
  border-color: #2f9976;
  background: #16382d;
}

.top-actions .status-pill.state-stopped,
.top-actions .status-pill.state-safety_stop {
  color: #ff9ca7;
  border-color: #a74653;
  background: #3d1d24;
}

.top-actions .status-pill.state-starting,
.top-actions .status-pill.state-flood_wait,
.top-actions .status-pill.state-outside_hours {
  color: #ffdc91;
  border-color: #95712d;
  background: #3d3119;
}

/* Runtime state may tint the dashboard shell, but never recolor KPI icons. */
.dashboard-state .kpi-icon {
  color: #fff !important;
  background: #242033 !important;
  border-color: var(--kpi-glow, #8b4dff) !important;
  box-shadow: 0 0 10px var(--kpi-glow, #8b4dff),
              0 0 24px var(--kpi-glow, #8b4dff) !important;
}

.timeline-countdown {
  color: #9eeed3;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: nowrap;
}

.creative-delete-form {
  margin: 10px 16px 16px;
}

.creative-delete-form button {
  width: 100%;
}

.creative-media img {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.creative-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 58px 24px 76px;
  background: rgba(3, 3, 8, .94);
  backdrop-filter: blur(12px);
}

.creative-lightbox.is-open {
  display: grid;
}

.creative-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1500px);
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 0 0 1px #8854d8, 0 24px 80px #000;
}

.creative-lightbox-close {
  position: fixed;
  top: 16px;
  right: 18px;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
  background: #292333;
  border-color: #8d64c9;
}

.creative-lightbox-open {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 16px;
  border: 1px solid #8d64c9;
  border-radius: 11px;
  background: #292333;
  color: #fff;
  font-weight: 800;
}

/* v1.12: media is fully visible in-card; management controls remain below. */
.creative-media {
  height: clamp(390px, 48vw, 620px) !important;
  min-height: 390px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #05060a !important;
}

.creative-media img,
.creative-media video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #05060a !important;
}

@media (max-width: 700px) {
  .creative-media {
    height: min(68vh, 560px) !important;
    min-height: 380px !important;
    flex-basis: auto !important;
  }
}

.sale-delete-form {
  margin: 0;
}

.sale-delete-button {
  padding: 7px 11px;
  font-size: 12px;
  white-space: nowrap;
}
