/* Contextual NASA FIRMS and haze preview used on the Facts, Threats, and Tanjung Puting pages. */

.ofi-habitat-fire-mini {
  background: var(--ofi-color-surface-tan-soft);
}

.ofi-habitat-fire-mini__grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.ofi-habitat-fire-mini__copy {
  max-width: 33rem;
}

.ofi-habitat-fire-mini__map-wrap {
  min-width: 0;
}

.ofi-habitat-fire-mini__map {
  position: relative;
  width: 100%;
  height: clamp(22rem, 42vw, 31rem);
  overflow: hidden;
  border: 1px solid var(--ofi-color-border-soft);
  border-radius: 12px;
  background: var(--ofi-color-surface-light);
  box-shadow: var(--ofi-effect-shadow-card);
}

.ofi-habitat-fire-mini__status {
  margin: 0;
  color: var(--ofi-color-text-secondary);
  font-size: var(--ofi-font-size-body-compact);
}

.ofi-habitat-fire-mini__status strong {
  color: var(--ofi-color-text-primary);
}

.ofi-habitat-fire-mini__note {
  margin: .7rem 0 0;
  color: var(--ofi-color-text-muted);
  font-size: .8rem;
  line-height: 1.5;
}

.ofi-habitat-fire-mini .maplibregl-popup-content,
.ofi-fire-popup .maplibregl-popup-content {
  max-width: 15rem;
  padding: .85rem 1rem;
  border-radius: 8px;
  color: var(--ofi-color-text-primary);
  font-family: var(--ofi-font-family-body);
  line-height: 1.45;
}

.ofi-habitat-fire-mini .maplibregl-popup-content strong,
.ofi-fire-popup .maplibregl-popup-content strong {
  display: block;
  margin-bottom: .35rem;
  font-family: var(--ofi-font-family-heading);
}

.ofi-habitat-fire-mini .maplibregl-popup-content p,
.ofi-fire-popup .maplibregl-popup-content p,
.ofi-map-popup p {
  margin: .2rem 0;
  font-size: .85rem;
  line-height: 1.45;
}

.ofi-habitat-fire-mini .maplibregl-ctrl-attrib {
  font-size: 10px;
}

/* Reusable compact MapLibre zoom controls for contextual/place maps. */
.ofi-map--compact-controls .maplibregl-ctrl-group {
  transform: scale(.84);
  transform-origin: bottom left;
}

.ofi-map--compact-controls .maplibregl-ctrl-bottom-left .maplibregl-ctrl {
  margin: 0 0 8px 8px;
}

@media (max-width: 800px) {
  .ofi-habitat-fire-mini__grid {
    grid-template-columns: 1fr;
  }

  .ofi-habitat-fire-mini__copy {
    max-width: none;
  }

  .ofi-habitat-fire-mini__map {
    height: 24rem;
  }
}

@media (max-width: 520px) {
  .ofi-habitat-fire-mini__map {
    height: 20rem;
    border-radius: 8px;
  }
}
