/*
 * Research Garden — visual styles
 * Adapted from Philippe Laban's Research Garden (https://tingofurro.github.io/)
 * Original garden.css by Philippe Laban — used with attribution.
 */

/* Full-width breakout — spans the viewport regardless of content column */
#garden-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  overflow-x: auto;
}
#garden_container { min-width: 100%; }
#garden { display: block; }

/* ── Stems ── */
.stem {
  stroke: #1a7d6d;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
}
.root_stem {
  stroke: #1a7d6d;
  stroke-width: 4;
  stroke-linecap: round;
}

/* ── Petals ── */
.petal { transition: fill 0.2s; }

/* ── Flower ── */
.flower { cursor: pointer; }
.flower .flower_subgroup {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.10));
  transform-origin: center;
  transform-box: fill-box;
}
.flower:hover .flower_subgroup {
  transform: scale(1.2);
  transition: transform 0.2s;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.15));
}
.flower:hover .petal { opacity: 1 !important; }
.selected_flower .flower_subgroup {
  transform: scale(1.5);
  transition: transform 0.2s;
}

/* ── Plant labels ── */
.direction-label {
  font-size: 15px;
  font-weight: 500;
  text-anchor: middle;
  fill: #333;
  font-family: system-ui, sans-serif;
}
.plant_label0 { font-weight: 600; font-size: 15px; }
.plant_label1 { font-weight: 300; font-size: 13px; }

/* ── Paper labels ── */
.label { pointer-events: none; }
.paper_label0 { cursor: pointer; font-weight: 500; font-size: 13px; fill: #333; }
.paper_label1,
.paper_label2 { cursor: pointer; font-weight: 300; font-size: 11px; fill: #555; }
.left_child_title { text-anchor: end; }

/* ── Indirect connections ── */
.indirect_connection {
  stroke: rgba(19,150,84,0.4);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

/* ── Subtle attribution ── */
.garden-credit {
  font-size: 11px; color: #bbb; text-align: right;
  padding: 2px 10px 0; margin: 0;
}
.garden-credit a { color: #ccc; text-decoration: none; }
.garden-credit a:hover { text-decoration: underline; }

/* ── Paper modal ── */
#paper_modal_backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.22);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999; display: none;
}
#paper_modal {
  position: fixed; top: 50%; left: 50%;
  width: 480px; max-width: 92vw;
  max-height: 80vh; overflow-y: auto;
  transform: translate(-50%,-50%);
  background: #fff; z-index: 1000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  padding: 26px 28px; box-sizing: border-box;
  border-radius: 12px; border: 1px solid rgba(0,0,0,0.06);
  display: none;
}
#paper_modal_close {
  position: absolute; top: 8px; right: 10px;
  width: 32px; height: 32px; display: flex;
  align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; color: #888;
  border-radius: 50%; transition: background .18s;
}
#paper_modal_close:hover { background: #f0f0f0; color: #333; }
#paper_modal_title { font-size: 18px; font-weight: 600; }
#paper_modal_venue { font-size: 14px; font-weight: 400; color: #666; margin-top: 4px; }
#paper_modal_links { margin-top: 16px; text-align: center; }
#paper_modal_links a {
  display: inline-block; padding: 6px 18px; margin: 3px;
  border-radius: 14px; background: #ede9fe; color: #5b21b6;
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background .18s;
}
#paper_modal_links a:hover { background: #ddd6fe; }

/* ── Toggle button ── */
.garden-btn {
  font-size: 13px; font-weight: 600; padding: 5px 14px;
  border: 1.5px solid #7c3aed; border-radius: 20px;
  background: #fff; color: #7c3aed; cursor: pointer;
  transition: background .18s, color .18s; white-space: nowrap;
}
.garden-btn:hover, .garden-btn-active { background: #7c3aed; color: #fff; }
