/* Shared Display PWA and firmware heater panel. */
.heater-panel, .heater-panel * { box-sizing: border-box; }

.heater-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(124, 242, 207, 0.10), transparent 28%),
    radial-gradient(circle at bottom left, rgba(123, 199, 255, 0.08), transparent 26%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
}

.heater-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.heater-panel__header-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.heater-panel__header-copy h2 {
  margin: 0;
  font-size: clamp(1.18rem, 2.2vw, 1.7rem);
  line-height: 1.05;
}

.heater-panel__state {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.heater-panel__state-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heater-panel__state-value {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1;
}

.heater-panel__state-hint {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
}

.heater-panel__state.is-success {
  border-color: rgba(124, 242, 207, 0.28);
  background: rgba(124, 242, 207, 0.08);
}

.heater-panel__state.is-error,
.heater-panel__state.is-warn {
  border-color: rgba(255, 139, 139, 0.24);
  background: rgba(255, 139, 139, 0.08);
}

.heater-panel__support {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.heater-panel__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.heater-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(4, 10, 12, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 108px;
}

.heater-card[style*="display: none"] {
  min-height: 0;
}

.heater-card__head {
  display: grid;
  gap: 4px;
}

.heater-card__label {
  font-size: 0.86rem;
  font-weight: 700;
}

.heater-card__meta {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.2;
}

.heater-card__meta[hidden] {
  display: none;
}

.heater-card__body {
  display: grid;
  gap: 10px;
}

.heater-card__readout {
  display: grid;
  gap: 6px;
}

.heater-value-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  color: var(--muted);
  font-size: 0.78rem;
}

.heater-value-row strong {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 700;
}

.heater-value-row__value--emphasis {
  color: var(--accent-strong);
  font-size: 1.18rem;
  font-weight: 800;
}

.heater-card__note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.heater-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.heater-chip {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 38px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.heater-chip:hover,
.heater-chip:focus-visible {
  transform: translateY(-1px);
  outline: none;
  border-color: rgba(124, 242, 207, 0.26);
}

.heater-chip.active {
  background: linear-gradient(180deg, rgba(124, 242, 207, 0.18), rgba(124, 242, 207, 0.10));
  border-color: rgba(124, 242, 207, 0.34);
  color: #f5fffb;
}

.heater-select,
.heater-slider {
  width: 100%;
}

.heater-control-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.heater-control-row__label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.heater-control-row.is-disabled {
  opacity: 0.5;
}

.heater-slider-shell {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.heater-select {
  appearance: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  min-height: 44px;
}

.heater-slider {
  accent-color: var(--accent);
  position: relative;
  z-index: 2;
}

.heater-panel .heater-unconfirmed {
  outline: 2px solid #e6bd53;
  outline-offset: 3px;
  border-radius: 12px;
}

.heater-panel .pending {
  animation: heater-pending-pulse 1.2s ease-in-out infinite;
}

.heater-panel .pending .heater-chip,
.heater-panel .pending .heater-select {
  animation: heater-pending-pulse 1.2s ease-in-out infinite;
}

@keyframes heater-pending-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(124, 242, 207, 0.08);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 3px rgba(124, 242, 207, 0.28);
    opacity: 0.92;
  }
}

.heater-slider-shell.pending {
  animation: heater-slider-shell-pulse 1.2s ease-in-out infinite;
  border-color: rgba(124, 242, 207, 0.38);
}

@keyframes heater-slider-shell-pulse {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(124, 242, 207, 0.12), 0 0 0 0 rgba(124, 242, 207, 0.05);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(124, 242, 207, 0.28), 0 0 0 4px rgba(124, 242, 207, 0.08);
  }
}

.heater-slider.is-ticking {
  box-shadow: 0 0 0 3px rgba(124, 242, 207, 0.22);
  border-radius: 999px;
  transition: box-shadow 120ms ease;
}

.heater-panel .panel-note {
  max-width: 60ch;
}

/* Preserve the Display PWA's compact panel sizing in both hosts. */
@media (max-width: 640px) {
  .heater-panel {
    padding: 14px;
    border-radius: 22px;
  }
}

