/* Shared commercial roof engine: map and panels have independent readiness. */
#opportunityRoofMap .leaflet-pane,
#opportunityRoofMap .leaflet-control-container {
  opacity: 1 !important;
}

#opportunityRoofMap.is-map-ready::before,
#opportunityRoofMap.is-unavailable::before {
  display: none !important;
}

#opportunityRoofMap .opportunity-panel-canvas {
  display: block !important;
  visibility: hidden !important;
  opacity: 0 !important;
  z-index: 650 !important;
  pointer-events: none !important;
  transition: opacity 180ms ease !important;
}

#opportunityRoofMap[data-panels-visible="true"] .opportunity-panel-canvas {
  visibility: visible !important;
  opacity: 1 !important;
}

#opportunityRoofMap[data-status="AUTO_LAYOUT_LOW_CONFIDENCE"] .opportunity-panel-canvas,
#opportunityRoofMap[data-status="ROOF_DATA_UNAVAILABLE"] .opportunity-panel-canvas,
#opportunityRoofMap[data-status="loading"] .opportunity-panel-canvas {
  visibility: hidden !important;
  opacity: 0 !important;
}

#opportunityRoofMap[data-status="AUTO_LAYOUT_LOW_CONFIDENCE"] .commercial-layout-v2-badge,
#opportunityRoofMap[data-status="ROOF_DATA_UNAVAILABLE"] .commercial-layout-v2-badge {
  border-color: rgba(255, 183, 77, 0.78) !important;
}

#opportunityRoofMap[data-status="AUTO_LAYOUT_CONFIRMED"] .commercial-layout-v2-badge {
  border-color: rgba(242, 211, 79, 0.68) !important;
}

#opportunityRoofMap .commercial-layout-v2-badge strong,
#opportunityRoofMap .commercial-layout-v2-badge em,
#opportunityRoofMap .commercial-layout-v2-badge span {
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  #opportunityRoofMap .opportunity-panel-canvas {
    transition: none !important;
  }
}
