/* Noise Pollution Meter — tool-specific overrides only.
   Shared tokens/components live in design-system.css. BEM prefix: npm */

/* Honest caveat note in the hero */
.npm-warn-note {
  max-width: 800px;
  margin: var(--space-md) auto 0;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-warning);
  border-left: 4px solid var(--color-warning);
  border-radius: var(--radius-sm);
  background: rgba(255, 179, 0, 0.07);
  color: #ffd479;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
}
.npm-warn-note strong { color: #ffd479; }

/* Two-column tool layout */
.npm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 760px) {
  .npm-grid { grid-template-columns: 1fr; }
}

/* Inputs */
.npm-select,
.npm-num {
  width: 100%;
  padding: 10px 12px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

/* Status line */
.npm-status {
  margin-top: var(--space-md);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-text-dim);
  min-height: 1.2em;
}
.npm-status--live { color: var(--color-primary); border-color: var(--color-primary); }
.npm-status--error { color: var(--color-error); border-color: var(--color-error); }

/* "shared" pill */
.npm-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--color-secondary);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-secondary);
  vertical-align: middle;
}

/* Calibration block */
.npm-cal__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
}
.npm-cal__row .npm-num { width: 100%; }
.npm-cal__state {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--color-text-dim);
}
.npm-cal__state--ok { color: var(--color-secondary); }
.npm-cal__state--warn { color: var(--color-warning); }

/* Big level readout */
.npm-readout {
  text-align: center;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 255, 65, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.npm-readout[data-on="true"] {
  border-color: var(--color-primary);
  background: rgba(0, 255, 65, 0.08);
}
.npm-readout__val {
  font-family: var(--font-mono);
  font-size: clamp(2.8rem, 10vw, 4rem);
  line-height: 1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.npm-readout__unit { font-size: 1rem; margin-left: 8px; color: var(--color-text-dim); }
.npm-readout__sub {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--color-secondary);
}

/* Traffic light */
.npm-light {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: var(--space-md);
  padding: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
}
.npm-light__lamp {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.22;
  transition: opacity 0.18s ease, box-shadow 0.18s ease;
}
.npm-light__lamp--green { background: var(--color-success); }
.npm-light__lamp--amber { background: var(--color-warning); }
.npm-light__lamp--orange { background: #ff7b00; }
.npm-light__lamp--red { background: var(--color-error); }

.npm-light[data-light="green"] .npm-light__lamp--green { opacity: 1; box-shadow: 0 0 12px var(--color-success); }
.npm-light[data-light="amber"] .npm-light__lamp--amber { opacity: 1; box-shadow: 0 0 12px var(--color-warning); }
.npm-light[data-light="orange"] .npm-light__lamp--orange { opacity: 1; box-shadow: 0 0 12px #ff7b00; }
.npm-light[data-light="red"] .npm-light__lamp--red { opacity: 1; box-shadow: 0 0 12px var(--color-error); }

.npm-light-label {
  margin-top: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-dim);
  min-height: 1.2em;
}

/* Exposure dose */
.npm-dose-wrap {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(0, 229, 255, 0.03);
}
.npm-dose-wrap__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
}
.npm-dose {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-secondary);
}

/* Session stat cells */
.npm-cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
@media (max-width: 540px) {
  .npm-cells { grid-template-columns: repeat(2, 1fr); }
}
.npm-cell {
  text-align: center;
  padding: var(--space-md) 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: rgba(0, 255, 65, 0.02);
}
.npm-cell__label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-dim);
}
.npm-cell__value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums;
}

.npm-foot {
  margin-top: var(--space-md);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}
