.report-status-section .container {
  width: min(1180px, calc(100% - 40px));
}

.report-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.report-heading-row h2,
.report-daily-section h2 {
  margin-bottom: 6px;
}

.report-help,
.report-freshness {
  margin: 0;
  color: var(--muted);
}

.report-freshness {
  flex: 0 0 auto;
  font-size: 0.9rem;
  text-align: right;
}

.report-freshness.is-fresh {
  color: var(--green-700);
}

.report-freshness.is-stale,
.report-freshness.is-error {
  color: var(--brown-dark);
}

.greenhouse-status {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid rgba(39, 54, 37, 0.14);
  border-radius: 18px;
  background: #d4d3ca;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.greenhouse-status__image {
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.greenhouse-status__hotspots {
  position: absolute;
  inset: 0;
}

.status-hotspot {
  --hotspot-color: 99, 107, 103;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  padding: 0;
  transform: translate(-50%, -50%) rotate(var(--rotate, 0deg));
  border: 2px solid rgba(var(--hotspot-color), 0.9);
  border-radius: var(--radius, 999px);
  background: rgba(var(--hotspot-color), 0.28);
  box-shadow: 0 0 0 4px rgba(var(--hotspot-color), 0.14);
  color: #fff;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.status-hotspot:hover,
.status-hotspot:focus-visible {
  z-index: 3;
  transform: translate(-50%, -50%) rotate(var(--rotate, 0deg)) scale(1.06);
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.status-hotspot::after {
  content: "";
  position: absolute;
  inset: -8px;
}

.status-hotspot.is-on {
  --hotspot-color: 35, 174, 93;
  animation: status-pulse 2.2s ease-in-out infinite;
}

.status-hotspot.is-off {
  --hotspot-color: 92, 101, 97;
}

.status-hotspot.is-unavailable,
.status-hotspot.is-loading {
  --hotspot-color: 111, 115, 112;
  border-style: dashed;
}

.status-hotspot--sensor,
.status-hotspot--illuminance {
  --hotspot-color: 79, 95, 88;
  display: grid;
  min-width: 34px;
  min-height: 42px;
  place-items: center;
  border-radius: 50% 50% 46% 46%;
  background: rgba(244, 239, 230, 0.9);
  color: var(--green-900);
  box-shadow: 0 4px 16px rgba(11, 28, 16, 0.28);
}

.status-hotspot--sensor.is-fresh,
.status-hotspot--illuminance.is-fresh {
  --hotspot-color: 49, 121, 74;
}

.status-hotspot__thermometer {
  position: relative;
  width: 8px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 6px 6px 4px 4px;
}

.status-hotspot__thermometer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border: 2px solid currentColor;
  border-radius: 50%;
  background: rgba(244, 239, 230, 0.98);
}

.status-hotspot__thermometer::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 4px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #d95846;
}

.status-hotspot__sun {
  color: #d58b16;
  font-family: Arial, sans-serif;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
  text-shadow: 0 1px 4px rgba(130, 83, 49, 0.2);
}

.status-hotspot__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: 150px;
  padding: 4px 8px;
  transform: translateX(-50%) rotate(calc(-1 * var(--rotate, 0deg)));
  border-radius: 6px;
  background: rgba(11, 28, 16, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

.status-hotspot:hover .status-hotspot__label,
.status-hotspot:focus-visible .status-hotspot__label {
  opacity: 1;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.status-legend__dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #68706c;
}

.status-legend__dot.is-on {
  background: #23ae5d;
}

.status-legend__dot.is-unavailable {
  border: 1px dashed #686d6a;
  background: transparent;
}

.report-daily-section img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  -webkit-user-drag: none;
  user-select: none;
}

.report-image-fallback {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

.status-modal[hidden] {
  display: none;
}

.status-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.status-modal__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(11, 28, 16, 0.64);
  cursor: default;
}

.status-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 26px 80px rgba(11, 28, 16, 0.36);
  text-align: center;
}

.status-modal__dialog:focus {
  outline: none;
}

.status-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--green-900);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.status-modal__close:hover,
.status-modal__close:focus-visible {
  background: var(--cream);
  outline: 2px solid var(--green-700);
}

.status-modal__eyebrow,
.status-modal__time {
  margin: 0;
  color: var(--muted);
}

.status-modal__dialog h2 {
  margin: 2px 0 8px;
}

.status-modal__value {
  margin: 0 0 8px;
  color: var(--green-800);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  line-height: 1.2;
}

@keyframes status-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(35, 174, 93, 0.15); }
  50% { box-shadow: 0 0 0 9px rgba(35, 174, 93, 0.28); }
}

@media (max-width: 760px) {
  .report-heading-row {
    display: block;
  }

  .report-freshness {
    margin-top: 8px;
    text-align: left;
  }

  .status-legend {
    justify-content: flex-start;
  }

  .status-hotspot {
    border-width: 1.5px;
    box-shadow: 0 0 0 2px rgba(var(--hotspot-color), 0.16);
  }

  .status-hotspot--sensor {
    min-width: 30px;
    min-height: 36px;
  }

  .status-hotspot__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status-hotspot,
  .status-hotspot.is-on {
    animation: none;
    transition: none;
  }
}
