/* Plate Level — thin screen-specific overrides on top of dashboards_common styles.css */

/* Differential Bio wordmark, parked in the top-right corner next to the actions. */
.top-bar__corner-logo { height: 34px; width: auto; align-self: center; margin-left: 6px; }

/* --- 3-column page layout (left rail / plate / detail) --------------------- */
.pl-grid3 {
  display: grid;
  /* left rail, then plate map + well-details (incl. growth curve) at equal width */
  grid-template-columns: 280px minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.pl-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pl-summaries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

@media (max-width: 1180px) {
  .pl-grid3 { grid-template-columns: 1fr; }
}

/* Tighten control rows; give dropdowns a sensible width. */
.panel__controls {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px;
}
.pl-control { display: flex; flex-direction: column; gap: 4px; min-width: 150px; }
.pl-control__label { font-size: 11px; font-weight: 600; color: var(--burnt); }
.panel__controls .Select, .panel__controls .dash-dropdown { min-width: 150px; }
.pl-check label { font-size: 12px; color: var(--deep-brown); }

/* --- PLATES sub-nav -------------------------------------------------------- */
.pl-subnav { display: flex; flex-direction: column; gap: 2px; }
.pl-subnav__item {
  font-family: inherit; font-size: 13px; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--deep-brown);
}
.pl-subnav__item:hover { background: rgba(28, 24, 36, 0.05); }
.pl-subnav__item.is-active {
  color: var(--amber-orange); background: rgba(216, 104, 29, 0.12);
  border-color: rgba(216, 104, 29, 0.28); font-weight: 600;
}

/* --- PLATE SUMMARY --------------------------------------------------------- */
.pl-summary { display: flex; flex-direction: column; gap: 6px; }
.pl-summary__row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; padding-bottom: 6px; border-bottom: 1px solid var(--hairline);
}
.pl-summary__label { color: var(--muted); }
.pl-summary__value { font-weight: 600; color: var(--deep-brown); font-variant-numeric: tabular-nums; }
.pl-summary__value--pass { color: var(--pass); }
.pl-summary__value--warn { color: var(--warn); }
.pl-summary__value--fail { color: var(--fail); }

/* --- WELL STATUS legend ---------------------------------------------------- */
.pl-legend { display: flex; flex-direction: column; gap: 8px; }
.pl-legend__item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pl-legend__label { color: var(--deep-brown); }
.pl-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.pl-dot--nodata { background: var(--panel-solid); border: 1px dashed var(--panel-border); }
.pl-glyph {
  width: 16px; text-align: center; font-weight: 700; color: var(--burnt); flex: none;
}
.pl-glyph--flag { color: var(--amber-orange); }

/* --- Plate grid (HTML cells, circular wells) ------------------------------- */
.plate {
  display: grid;
  grid-template-columns: 22px repeat(12, minmax(0, 1fr));
  gap: 6px; align-items: center; margin-bottom: 14px;
}
.plate__corner { }
.plate__colhead, .plate__rowhead {
  font-size: 11px; font-weight: 600; color: var(--muted); text-align: center;
}
.plate__rowhead { text-align: right; padding-right: 4px; }
.well {
  aspect-ratio: 1 / 1; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--sand); cursor: pointer; position: relative; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: inherit; transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.well:hover { transform: scale(1.12); box-shadow: var(--soft-shadow); z-index: 2; }
.well:focus-visible { outline: none; box-shadow: var(--focus-ring); z-index: 2; }
.well--control { border-style: dashed; border-color: var(--burnt); }
.well--nodata {
  background: var(--panel-solid);
  background-image: repeating-linear-gradient(45deg,
    transparent, transparent 3px, rgba(141, 64, 28, 0.12) 3px, rgba(141, 64, 28, 0.12) 4px);
}
.well--empty { background: transparent; border: none; cursor: default; }
.well.is-selected { box-shadow: 0 0 0 3px var(--amber-orange); z-index: 3; }
.well__value { font-size: 8px; font-weight: 600; color: var(--deep-brown); }
.well__sign { font-size: 11px; font-weight: 700; color: var(--burnt); }
/* Failure marker: black flag centred in the well (warnings are listed in WELL DETAILS). */
.well__flag {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1; color: #000000;
}

/* --- Grid legend bar ------------------------------------------------------- */
.pl-gridlegend { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.pl-gridlegend__range { font-weight: 600; color: var(--deep-brown); }
.pl-gridlegend__bar {
  width: 120px; height: 10px; border-radius: 6px;
  background: linear-gradient(90deg, #fff3df, #dea047, #d8681d, #8d401c);
  border: 1px solid var(--hairline);
}
.pl-hint { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* --- WELL FLAG SUMMARY ----------------------------------------------------- */
.pl-flagsummary__head, .pl-controlsummary__head {
  font-size: 13px; font-weight: 600; color: var(--amber-orange); margin-bottom: 10px;
}
.pl-flagsummary__cats { display: flex; flex-direction: column; gap: 8px; }
.pl-flagcat { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pl-flagcat__icon { color: var(--muted); width: 16px; text-align: center; }
.pl-flagcat__icon--growth { color: var(--pass); }
.pl-flagcat__icon--spatial { color: var(--accent); }
.pl-flagcat__icon--control { color: var(--warn); }
.pl-flagcat__label { flex: 1; color: var(--deep-brown); }
.pl-flagcat__count { font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- CONTROL SUMMARY + generic metric cells -------------------------------- */
.pl-controlsummary__grid, .pl-metrics {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.pl-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.pl-metric { display: flex; flex-direction: column; gap: 2px; }
.pl-metric__label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--burnt);
}
.pl-metric__value { font-size: 18px; font-weight: 700; color: var(--deep-brown); }

/* --- WELL DETAILS ---------------------------------------------------------- */
.pl-welldetails__title { display: flex; align-items: baseline; justify-content: space-between; }
.pl-welldetails__id { font-size: 22px; font-weight: 700; color: var(--amber-orange); }
.pl-flags { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pl-flags__head { font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--burnt); }
.pl-flag { display: flex; gap: 10px; align-items: flex-start; }
.pl-flag__icon { font-size: 14px; line-height: 1.2; color: var(--muted); flex: none; }
.pl-flag__icon--growth { color: var(--pass); }
.pl-flag__icon--spatial { color: var(--accent); }
.pl-flag__icon--control { color: var(--warn); }
.pl-flag__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-flag__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pl-flag__title { font-size: 13px; font-weight: 600; color: var(--deep-brown); }
.pl-flag__badge {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em; padding: 2px 6px;
  border-radius: 6px; background: rgba(28, 24, 36, 0.06); color: var(--burnt);
}
.pl-flag__prio { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.pl-flag__prio--p1 { background: rgba(192, 73, 43, 0.14); color: var(--fail); }
.pl-flag__prio--p2 { background: rgba(201, 138, 30, 0.16); color: var(--warn); }
.pl-flag__detail { font-size: 12px; color: var(--muted); }

.pl-curveblock__head { font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--burnt); margin-bottom: 6px; }
.pl-growth .js-plotly-plot, .pl-growth .dash-graph { min-height: 240px; }
.pl-doseresponse .js-plotly-plot, .pl-doseresponse .dash-graph { min-height: 420px; }

/* WELL DETAILS: nitrogen source + concentration (or control condition) subtitle. */
.pl-welldetails__condition { font-size: 13px; font-weight: 600; color: var(--amber-orange);
  margin: 2px 0 12px; }
