/* PorchLight Fall Prevention — Supplemental styles for the audit tool
   Loads AFTER /porchlight-tub/quiz.css (shared pl-widget styles).
   Only contains classes unique to the fall-prevention audit.
*/

/* --- Room picker cards --- */
.pl-widget .pl-room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 1rem 0;
}
.pl-widget .pl-room-card {
  background: #fff;
  border: 2px solid var(--pl-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.pl-widget .pl-room-card:hover {
  border-color: var(--pl-gold);
  background: #fffbf2;
}
.pl-widget .pl-room-card-active {
  border-color: var(--pl-gold);
  background: var(--pl-gold);
}
.pl-widget .pl-room-card-active .pl-room-title,
.pl-widget .pl-room-card-active .pl-room-sub {
  color: var(--pl-navy);
}
.pl-widget .pl-room-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--pl-navy);
  display: block;
  margin-bottom: 3px;
}
.pl-widget .pl-room-sub {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.3;
}

/* --- Hazard checklist --- */
.pl-widget .pl-hazard-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}
.pl-widget .pl-hazard-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 2px solid var(--pl-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pl-widget .pl-hazard-item:hover {
  border-color: var(--pl-gold);
  background: #fffbf2;
}
.pl-widget .pl-hazard-item-active {
  border-color: var(--pl-gold);
  background: #fffbf2;
}
.pl-widget .pl-hazard-check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--pl-border);
  border-radius: 5px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: transparent;
  margin-top: 1px;
  transition: all 0.15s;
}
.pl-widget .pl-hazard-item-active .pl-hazard-check {
  background: var(--pl-gold);
  border-color: var(--pl-gold);
  color: var(--pl-navy);
}
.pl-widget .pl-hazard-check::after { content: "✓"; }
.pl-widget .pl-hazard-text {
  flex: 1;
  font-size: 0.95rem;
  color: var(--pl-charcoal);
  line-height: 1.4;
}

/* Priority pill on each hazard */
.pl-widget .pl-priority-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.pl-widget .pl-priority-1 {
  background: #FBEDEC;
  color: #C84B3F;
  border: 1px solid #E8B9B4;
}
.pl-widget .pl-priority-2 {
  background: #FDF6E3;
  color: #AA7A20;
  border: 1px solid #F0D985;
}
.pl-widget .pl-priority-3 {
  background: #EFEEEA;
  color: #666;
  border: 1px solid #D8D4CA;
}

/* --- Context-question checkboxes (smaller, inline) --- */
.pl-widget .pl-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0.75rem 0;
}
.pl-widget .pl-context-item {
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* --- Risk badge (headline on results) --- */
.pl-widget .pl-risk-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  margin-bottom: 8px;
}
.pl-widget .pl-risk-LOW    { background: #6B7F5B; }
.pl-widget .pl-risk-MODERATE { background: #F5B841; color: #1B2A41; }
.pl-widget .pl-risk-HIGH   { background: #C84B3F; }

.pl-widget .pl-risk-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--pl-navy);
  line-height: 1.3;
  margin: 0.25rem 0 0.5rem;
}
.pl-widget .pl-risk-summary {
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Prioritized fix list --- */
.pl-widget .pl-fix-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.pl-widget .pl-fix-item {
  padding: 12px 0 12px 36px;
  position: relative;
  border-bottom: 1px solid var(--pl-border);
  color: #333;
  font-size: 0.95rem;
  line-height: 1.5;
}
.pl-widget .pl-fix-item:last-child {
  border-bottom: none;
}
.pl-widget .pl-fix-num {
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--pl-gold);
  border: 1.5px solid var(--pl-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--pl-navy);
}
.pl-widget .pl-fix-hazard {
  font-weight: 600;
  color: var(--pl-navy);
  display: block;
}
.pl-widget .pl-fix-action {
  color: #555;
  font-size: 0.88rem;
  margin-top: 2px;
}

/* --- Diagram container + engineering-drawing SVG classes ---
   (duplicated from ramps/calculator.css so this tool is self-contained) */
.pl-widget .pl-diagram-card {
  padding-bottom: 1.25rem;
}
.pl-widget .pl-diagram {
  width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem 0 0;
}
.pl-widget .pl-diag-wall { fill: #FFFBF2; stroke: #1B2A41; stroke-width: 2; }
.pl-widget .pl-diag-fixture { fill: #E8E4DB; stroke: #1B2A41; stroke-width: 1.2; }
.pl-widget .pl-diag-fixture-dashed { fill: #FFFBF2; stroke: #1B2A41; stroke-width: 1; stroke-dasharray: 4 3; }
.pl-widget .pl-diag-fixture-inner { fill: #fff; stroke: #1B2A41; stroke-width: 1; }
.pl-widget .pl-diag-hazard { fill: #F5B841; stroke: #1B2A41; stroke-width: 1.5; }
.pl-widget .pl-diag-hazard-num {
  font: 700 13px "Inter", -apple-system, sans-serif;
  fill: #1B2A41;
  text-anchor: middle;
  dominant-baseline: central;
}
.pl-widget .pl-diag-door-arc { stroke: #1B2A41; stroke-width: 1; stroke-dasharray: 3 3; fill: none; }
.pl-widget .pl-diag-door-gap { stroke: #FFFBF2; stroke-width: 3; fill: none; }
.pl-widget .pl-diag-stair-nose { stroke: #1B2A41; stroke-width: 0.8; fill: none; }
.pl-widget .pl-diag-burner { fill: #fff; stroke: #1B2A41; stroke-width: 1; }
.pl-widget .pl-diag-dim { stroke: #555; stroke-width: 1; fill: none; }
.pl-widget .pl-diag-dim-text { font: 500 11px "Inter", -apple-system, sans-serif; fill: #555; }
.pl-widget .pl-diag-label {
  font: 600 10px "Inter", -apple-system, sans-serif;
  fill: #1B2A41;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pl-widget .pl-diag-label-sm {
  font: 600 8px "Inter", -apple-system, sans-serif;
  fill: #1B2A41;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Diagram legend (numbered list under the SVG, matches markers) --- */
.pl-widget .pl-diag-legend {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  font-size: 0.85rem;
  color: #444;
}
.pl-widget .pl-diag-legend li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 2px 0;
}
.pl-widget .pl-diag-legend-num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pl-gold);
  border: 1.5px solid var(--pl-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--pl-navy);
  margin-top: 1px;
}

/* --- Products list: compact product links --- */
.pl-widget .pl-product-group {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--pl-border);
}
.pl-widget .pl-product-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.pl-widget .pl-product-group h4 {
  font-size: 0.9rem;
  color: var(--pl-navy);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .pl-widget .pl-room-grid,
  .pl-widget .pl-context-grid {
    grid-template-columns: 1fr;
  }
  .pl-widget .pl-risk-headline {
    font-size: 1.1rem;
  }
}
