/* 20-mother.css — Mother room rows, pots, detail panel
   Part of the ordered set linked from index.html. The parts concatenate to the
   original stylesheet byte for byte; link order IS the cascade order, so never
   reorder the <link> tags and never move a rule between files. */

#flowerRoomSection {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  margin-bottom: 16px;
}

/* ============================================================
   MOTHER ROOM
   ============================================================ */

#motherRoomSection {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  margin-bottom: 16px;
}

.mr-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mr-title {
  font-size: 22px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.mr-subtitle {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
}

.mr-add-btn {
  border: 1px solid var(--accent);
  background: rgba(143,195,106,0.08);
  color: var(--accent);
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mr-add-btn:hover { background: rgba(143,195,106,0.18); }

.mr-stats-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mr-stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--line);
}

.mr-stat-badge.healthy { color: var(--accent); }
.mr-stat-badge.flagged { color: var(--warn); }
.mr-stat-badge.retired { color: var(--muted); }
.mr-stat-badge.error { color: var(--bad); }

.mr-search-wrap { display: grid; grid-template-columns: minmax(230px, 460px) auto; align-items: end; gap: 6px 12px; margin: 14px 0 16px; }
.mr-search-label { grid-column: 1 / -1; color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.mr-search-box { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 11px; border: 1px solid rgba(255,255,255,0.22); background: rgba(255,255,255,0.055); }
.mr-search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(143,195,106,0.12); }
.mr-search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.mr-search-box input::placeholder { color: rgba(255,255,255,0.45); }
.mr-search-box button { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.mr-search-results { color: var(--muted); font-size: 14px; padding-bottom: 12px; }

@media (max-width: 640px) {
  .mr-search-wrap { grid-template-columns: 1fr; }
  .mr-search-results { padding-bottom: 0; }
}

.fr-dot.retired { background: #555; }
.fr-dot.error { background: var(--bad); }

.gf-source-tag {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--warn);
  border: 1px solid rgba(228,180,93,0.4);
  padding: 3px 8px;
  letter-spacing: 0.06em;
}

/* Rows */
.mr-rows {
  flex-direction: column;
  margin-bottom: 16px;
}

.mr-row {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.mr-row-meta {
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.mr-row-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}



.mr-water-row-btn {
  margin-left: auto;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 3px 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  min-width: unset;
}

.mr-water-row-btn:hover {
  color: #7ec8df;
  border-color: rgba(100,169,196,0.5);
  background: rgba(100,169,196,0.08);
}

/* Pots */

.mr-pot {
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s, outline 0.1s;
  flex-shrink: 0;
}

.mr-pot:hover {
  transform: scale(1.2);
  z-index: 2;
  outline: 2px solid #fff;
}

.mr-pot.sel {
  outline: 2px solid #fff;
  transform: scale(1.2);
  z-index: 3;
}

.mr-pot.retired {
  opacity: 0.45;
}

.mr-pot-num {
  font-size: 9px;
  font-weight: 700;
  color: rgba(0,0,0,0.5);
  pointer-events: none;
  user-select: none;
}

.mr-sdot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.3);
}

.mr-sdot.flagged { background: #e4b45d; }
.mr-sdot.retired { background: #555; }

/* Detail panel */
.mr-detail {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 18px;
  min-height: 80px;
}

.mr-detail-hint {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.mr-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mr-detail-strain {
  font-size: 20px;
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mr-detail-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mr-detail-dl {
  margin: 14px 0 0;
  display: grid;
  gap: 8px;
}

.mr-detail-dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  font-size: 14px;
}

.mr-detail-dl dt { color: var(--muted); }
.mr-detail-dl dd { margin: 0; font-weight: 700; }

.mr-sku {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  background: var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  word-break: break-all;
}

.mr-sku-missing { color: var(--warn, #d9822b); font-weight: 700; }

.mr-notes {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 16px;
  min-height: 36px;
}

.mr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.mr-action-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 7px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.mr-action-btn:hover { background: rgba(255,255,255,0.05); }

.mr-action-btn.accent {
  color: var(--accent);
  border-color: rgba(143,195,106,0.5);
  background: rgba(143,195,106,0.08);
}

.mr-action-btn.accent:hover { background: rgba(143,195,106,0.18); }

.mr-action-btn.green {
  color: var(--accent);
  border-color: rgba(143,195,106,0.5);
}

.mr-action-btn.warn {
  color: var(--bad);
  border-color: rgba(232,111,95,0.4);
}

.mr-action-btn.warn:hover { background: rgba(232,111,95,0.1); }

.mr-action-btn.bad {
  color: #fff;
  background: rgba(232,111,95,0.85);
  border-color: rgba(232,111,95,0.85);
}


/* Off the bench — retired or dead mothers that have left the grid but have not
   yet been recorded as removed. A worklist, not an archive: it empties as staff
   stamp each removal, and an empty list means the screen matches the bench. */
.mr-offbench {
  margin: 12px 0 4px;
  border: 1px solid rgba(232,111,95,0.35);
  border-radius: 10px;
  background: rgba(232,111,95,0.05);
  padding: 10px 14px;
}

.mr-offbench > summary {
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
  padding: 2px 0;
}

.mr-offbench > summary::-webkit-details-marker { display: none; }

.mr-offbench > summary::before {
  content: "\25B8";
  display: inline-block;
  width: 14px;
  color: var(--bad);
}

.mr-offbench[open] > summary::before { transform: rotate(90deg); }

.mr-offbench > summary strong { color: var(--bad); }

#motherRoomSection .mr-pick-tile { touch-action: pan-y; cursor: default; max-width: 100%; }
#mrPickBar.active { position: sticky; top: var(--gf-navbar-cover, 58px); z-index: 40; background: var(--panel); }
.mr-pick-plant { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; cursor: pointer; }
.mr-pick-plant.picked { border-color: var(--accent); background: rgba(143,195,106,0.12); }
.mr-pick-plant input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--accent); }
.mr-pick-hint { flex-basis: 100%; color: var(--muted); font-size: 14px; }
