﻿.bpr-reader {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 1rem;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.bpr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bpr-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.bpr-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bpr-input-wrap input,
.bpr-field select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.6rem 0.7rem;
  background: #fff;
}

.bpr-unit {
  font-size: 0.9rem;
  color: #334155;
  min-width: 48px;
}

.bpr-field small {
  color: #64748b;
}

.bpr-form-actions {
  margin-top: 1rem;
}

.bpr-submit {
  background: #0f766e;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.bpr-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.bpr-field-error,
.bpr-general-error {
  color: #b91c1c;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.bpr-results {
  margin-top: 1.25rem;
}

.bpr-summary {
  background: #fff;
  border-left: 4px solid #0ea5e9;
  padding: 0.7rem 0.8rem;
  border-radius: 8px;
}

.bpr-chart-wrap {
  margin-top: 0.8rem;
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem;
  height: 280px;
}

.bpr-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

.bpr-legend .swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 0.3rem;
  vertical-align: middle;
}
.bpr-legend .low { background: #3b82f6; }
.bpr-legend .ideal { background: #16a34a; }
.bpr-legend .above { background: #f59e0b; }
.bpr-legend .high { background: #dc2626; }
.bpr-legend .reading { background: #111827; }

.bpr-disclaimer {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #334155;
}

.bpr-fallback-row {
  margin-top: 0.8rem;
}
.bpr-fallback-track {
  position: relative;
  height: 16px;
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 18% 34% 18% 30%;
}
.bpr-zone-low { background: #3b82f6; }
.bpr-zone-ideal { background: #16a34a; }
.bpr-zone-above { background: #f59e0b; }
.bpr-zone-high { background: #dc2626; }
.bpr-marker {
  position: absolute;
  top: -2px;
  width: 5px;
  height: 20px;
  background: #111827;
  transform: translateX(-50%);
}
.bpr-fallback-ticks {
  font-size: 0.78rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 0.25rem;
  color: #475569;
}

@media (max-width: 640px) {
  .bpr-grid {
    grid-template-columns: 1fr;
  }
  .bpr-chart-wrap {
    height: 240px;
  }
}
