/* Outside the farm's clipping/stacking context; keeps the tile and plant intact. */
.plant-tooltip {
  --plant-accent: #507c3b;
  position: fixed; z-index: 50; width: 302px; max-width: calc(100vw - 20px);
  border: 1px solid #d6c79f; border-radius: 17px; background: #fffbec; color: #443c2b;
  box-shadow: 0 12px 34px #203c2940, 0 3px 0 #5f6e3b24;
  font-family: 'Trebuchet MS', -apple-system, BlinkMacSystemFont, sans-serif;
  pointer-events: auto; user-select: none;
}
.plant-tooltip[hidden] { display: none; }
.plant-tooltip::before {
  content: ''; position: absolute; width: 10px; height: 10px; z-index: -1;
  background: #fffbec; border: 1px solid #d6c79f; transform: rotate(45deg);
}
.plant-tooltip[data-side='right']::before { left: -6px; top: calc(var(--arrow-y) - 5px); border-right: 0; border-top: 0; }
.plant-tooltip[data-side='left']::before { right: -6px; top: calc(var(--arrow-y) - 5px); border-left: 0; border-bottom: 0; }
.plant-tooltip[data-side='above']::before { bottom: -6px; left: calc(var(--arrow-x) - 5px); border-left: 0; border-top: 0; }
.plant-tooltip[data-side='below']::before { top: -6px; left: calc(var(--arrow-x) - 5px); border-right: 0; border-bottom: 0; }
.plant-tooltip-head { display: flex; align-items: center; gap: 9px; padding: 13px 14px 11px; border-bottom: 1px solid #e4dfc3; background: #f0f1d9; border-radius: 16px 16px 0 0; }
.plant-tooltip-art { flex: 0 0 37px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #fbf9e7; border: 1px solid #dae0bc; }
.plant-tooltip-art img { display: block; width: auto; max-width: 30px; height: 34px; object-fit: contain; }
.plant-tooltip-art img[hidden], .plant-tooltip-art span[hidden] { display: none; }
.plant-tooltip-art span { font-size: 24px; }
.plant-tooltip-name { flex: 1; min-width: 0; }
.plant-tooltip-name strong { display: block; color: #385431; font: bold 19px Georgia, serif; }
.plant-tooltip-name > span { display: block; margin-top: 3px; font-size: 10px; color: #75795c; }
.plant-tooltip-status { display: flex; align-items: center; gap: 5px; color: #46713a; background: #e0eccf; padding: 5px 7px; border-radius: 20px; font-size: 9px; white-space: nowrap; }
.plant-tooltip-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.plant-tooltip[data-mode='growing'] .plant-tooltip-status i { animation: plant-alive 1.8s ease-in-out infinite; }
.plant-tooltip-body { padding: 14px 16px 12px; }
.plant-tooltip-eyebrow { font-size: 9px; font-weight: bold; letter-spacing: 1.4px; color: #8a8064; }
.plant-tooltip-countdown { margin: 5px 0 11px; font: 600 33px/1.1 ui-monospace, 'Cascadia Mono', Consolas, monospace; font-variant-numeric: tabular-nums; letter-spacing: 1px; color: #355335; }
.plant-tooltip-progress { height: 6px; overflow: hidden; border-radius: 6px; background: #e9e5cb; }
.plant-tooltip-progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #547f3c, #98b955); transition: width 1s linear; }
.plant-tooltip-phases { display: flex; gap: 5px; margin: 9px 0 14px; }
.plant-tooltip-phases[hidden] { display: none; }
.plant-tooltip-phases span { flex: 1; color: #9a9b85; padding-top: 5px; border-top: 2px solid #e3e3cc; font-size: 9px; }
.plant-tooltip-phases [data-state='done'] { border-color: #99b572; color: #6d845a; }
.plant-tooltip-phases [data-state='current'] { border-color: var(--plant-accent); color: var(--plant-accent); font-weight: bold; }
.plant-tooltip-harvest { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid #e8d5a3; background: #fff1cd; }
.plant-tooltip-harvest svg { flex: 0 0 19px; width: 19px; height: 22px; stroke: #9c792b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.plant-tooltip-harvest > span { flex: 1; min-width: 0; }
.plant-tooltip-harvest b { display: block; font-size: 11px; color: #755625; }
.plant-tooltip-harvest small { display: block; margin-top: 3px; font-size: 9px; color: #9b8555; }
.plant-tooltip-harvest > strong { font: bold 14px ui-monospace, Consolas, monospace; color: #70511f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plant-tooltip-note { margin: 0; padding: 10px 16px 12px; border-top: 1px dashed #dfdac0; border-radius: 0 0 16px 16px; color: #89836b; font-size: 10px; line-height: 1.5; }
.plant-tooltip[data-mode='paused'] { --plant-accent: #a17629; }
.plant-tooltip[data-mode='paused'] .plant-tooltip-status { background: #fae6b5; color: #916522; }
.plant-tooltip[data-mode='paused'] .plant-tooltip-countdown { color: #977331; }
.plant-tooltip[data-mode='paused'] .plant-tooltip-note { color: #8c692f; background: #fff5dc; }
.plant-tooltip[data-mode='ready'] .plant-tooltip-countdown { font-size: 26px; letter-spacing: -.4px; }
.plant-tooltip[data-mode='ready'] .plant-tooltip-note { color: #51783a; background: #f0f3db; }
/* Mouse hits on the plant itself also inspect/act on its own tile. */
#plots .crop-sprite, #plots .plot-cell .crop { pointer-events: auto; cursor: pointer; }
@keyframes plant-alive { 0%, 100% { box-shadow: 0 0 0 0 #6b994533; } 55% { box-shadow: 0 0 0 4px #6b994500; } }
@media (prefers-reduced-motion: reduce) {
  .plant-tooltip *, .plant-tooltip *::before { animation: none !important; transition: none !important; }
}
