html,
body {
  cursor: default;
}

#map,
#map-compare,
.mapboxgl-canvas {
  cursor: inherit;
}

#alerts-panel {
  margin-top: 10px;
  font-family: 'Inter', sans-serif;
}

.alerts-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.alerts-summary {
  margin: 5px 0 15px 0;
  font-size: 13px;
  color: #ccc;
}

.alerts-summary-row {
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  /* margin: 5px 0 12px 0; */
  gap: 8px;
  flex-wrap: wrap;
  /* margin-left: auto; */
  margin-bottom: 10px;
}

.alerts-summary-row .alerts-summary {
  margin: 0;
}

.alerts-summary-row .alerts-zoom-btn {
  /* margin: 0; */
  flex: 0 0 auto;
  white-space: nowrap;
}

.alerts-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  margin-top: 6px;
}

.alerts-summary-actions .alerts-zoom-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Filters */
.alerts-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.alerts-filters select,
.alerts-filters input[type="date"],
.alerts-filters input[type="text"] {
  background: #1a1c22;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 6px;
  color: #eee;
  font-size: 13px;
}

/* --- Make filter boxes shorter + tighter --- */
.alerts-filters .filter-group select[multiple] {
  height: 60px;        /* shorter box */
  min-height: 50px;    /* override any existing min-height */
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.2;
}

/* Alerts list */
#alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Alert card */
.alert-card {
  background: #14161b;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.alert-card:hover {
  background: #1b1d22;
}

.alert-card-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: #fff;
}

.alert-card-body {
  font-size: 12px;
  color: #aaa;
}

.alert-card.selected {
  border: 1px solid rgba(255,255,255,0.35);
  background: #1f2229;
  transform: scale(1.02);
}

.selected-alert-card {
  background: #1f2229;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #eee;
}

.selected-alert-card.hidden {
  display: none;
}

.selected-alert-card h4 {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.selected-alert-card .row {
  margin: 3px 0;
}

#selected-alert-float {
  overflow: visible !important;
  position: absolute;
  top: 110px;
  right: 400px;  /* matches sidebar width */
  width: 380px;
  z-index: 9999;
  cursor: grab; /* Draggable cursor */
}

#selected-alert-float.dragging {
  cursor: grabbing;
}

#selected-alert-float.hidden {
  display: none;
}

.s2-controls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-end;
  margin-top: 8px;
}

.s2-mode-block,
.s2-opacity-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: #ccc;
  flex: 1;
}

.s2-mode-block label,
.s2-opacity-block label {
  font-size: 11px;
  color: #ccc;
  display: block;
  margin-bottom: 2px;
}

#s2-mode-select {
  position: relative;
  z-index: 999999; /* ensure above floating card */
  background: #1a1c22;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 8px;
  border-radius: 6px;
  color: #eee;
  font-size: 12px;
}

#s2-opacity {
  width: 140px;
}

.s2-date-label {
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
    margin-bottom: -4px;
}

.s2-swipe-controls {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.s2-swipe-controls select {
    background: #1a1c22;
    color: #eee;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    padding: 3px 6px;
    flex: 1 1 45%
}

.s2-map-date-label {
  position: absolute;
  top: 10px;
  z-index: 10000;
  display: none;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}

.s2-map-date-label-left {
  left: 55px;
  top: 10px;
}

.s2-map-date-label-right {
  right: 10px;
  top: 10px
}


/* === Layer list colour swatches (SQUARES) === */
.layer-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  min-width: 14px;

  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.5);

  background-color: transparent;
  box-sizing: border-box;
  margin: 0; /* <- add this */
}

/* --- Make each layer label a 2-column grid: checkbox + content --- */
.layer-row label {
  display: grid;
  grid-template-columns: 18px 18px 1fr;
  column-gap: 10px !important;
  row-gap: 0px !important;

  align-items: start;
  padding-top: 0px !important; 
  padding-bottom: 0px !important;
}

/* Ensure checkbox sits in column 1 */
/* Checkbox (col 1) */
.layer-row label input[type="checkbox"]{
  grid-column: 1;
  margin: 0;
}

/* .layer-row label > span:not(.layer-swatch) {
  white-space: nowrap;
} */

/* Swatch (col 2) */
.layer-row label .layer-swatch{
  grid-column: 2;
  margin: 0;                /* ✅ remove the old inline margins */
}

/* Title (col 3) — keep on one line */
.layer-row label .layer-title{
  grid-column: 3;
  grid-row: 1;
}


/* Default swatch (single-color square) stays inline with the text */
.layer-row label .layer-swatch:not(.swatch-mini-legend){
  grid-column: 2;
  display: inline-block;
  vertical-align: middle;
  margin: 0 8px 0 0; /* remove left margin because checkbox handles spacing now */
}

/* Mini legend: align with the TEXT column (same column your titles live in) */
.layer-row label .layer-swatch.swatch-mini-legend{
  grid-column: 3;            /* ✅ move to the text column */
  margin: 0;                 /* ✅ remove the margin hack */
  justify-self: start;
  align-self: start;
  opacity: 0.95;
  display: block;
}

/* Tighten spacing under multi-class rows */
.layer-row:has(.swatch-mini-legend) {
  margin-bottom: 2px;   /* default is larger */
}


/* Multi-class: always-visible mini legend stack */
.layer-swatch.swatch-mini-legend {
  width: auto;
  height: auto;
  min-width: 0;

  /* ✅ remove “box” look */
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;

  display: inline-block;
  box-sizing: border-box;
}

.layer-swatch.swatch-mini-legend .mini-legend-title{
  font-size: 13px;
  /* font-weight: 500; */
  letter-spacing: 0.02em;
  /* opacity: 0.85; */
  margin-bottom: 1px;
  white-space: nowrap;
  /* display: none;              hide title to avoid "Forest Boundaries Forest Boundaries" */
}

.layer-swatch.swatch-mini-legend .mini-legend-row{
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 1px 0;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.layer-swatch.swatch-mini-legend .mini-legend-color{
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.section {
  margin-bottom: 8px;
}

/* Close button */
.close-alert-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 14px;
  width: 22px;
  height: 22px;
  line-height: 18px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.close-alert-btn:hover {
  background: rgba(255,255,255,0.25);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-props {
  margin-bottom: 8px;
}

.props-toggle {
  background: none;
  border: none;
  color: #eee;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.props-toggle .arrow {
  transition: transform 0.25s;
}

.props-toggle.open .arrow {
  transform: rotate(180deg);
}

.props-content {
  display: none;
  margin-top: 6px;
}

.props-content.open {
  display: block;
}

/* Wrapper */
#alerts-hist-and-card {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}



/* Histogram block grows to fill space */
#alerts-histogram-block {
  flex: 1;
}


.alert-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.alert-badge-pass {
  background: #2a7f00;
}

.alert-badge-action {
  background: #b00000;
}

.alert-badge-completed {
  background: #0066cc;
}

/* Dropdown that looks like the alert badge/pill */
.alert-status-select {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px; /* pill */
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  background: rgba(255,255,255,0.12);
  outline: none;
  cursor: pointer;
  line-height: 1.2;
}

/* Keep options readable (browser-dependent) */
.alert-status-select option {
  color: #000;
}

/* If your badge classes already set background colors, these will apply to select too.
   If not, you can define them here, e.g.:
.alert-badge-action { background: #d43c3c; }
.alert-badge-pass { background: #2ea44f; }
.alert-badge-completed { background: #64748b; }
*/

/* Toolbar / zoom button */
.alerts-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.alerts-zoom-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.25);
  color: #eee;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.alerts-zoom-btn:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

.alerts-zoom-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Multi-select filter groups */
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #ccc;
  min-width: 120px;
}

.filter-group select[multiple] {
  min-height: 50px;
}

.date-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-clear {
  align-self: flex-end;
  margin-top: 2px;
  font-size: 11px;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
}

.filter-clear:hover {
  color: #fff;
}

/* Histogram date picker */
#alerts-date-histogram {
  height: 80px;
  margin-bottom: 10px;
  position: relative;
  background: #111318;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 4px 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.alerts-hist-bar {
  flex: auto;
  /* background: linear-gradient(to top, #ebc725, #c52222);
  background: linear-gradient(to top, #2563eb, #22c55e); */
  background: rgba(255, 255, 255, 0.25); /* fallback if JS doesn't set color */
  /* border-radius: 2px 2px 0 0; */
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease, transform 0.2s ease, outline 0.2s ease;
  
  width: 18px;
  margin-right: 1px;
  border-radius: 3px;
  display: block;
  align-self: flex-end;
  /* vertical-align: bottom; */
}

.alerts-hist-bar:hover {
  opacity: 1;
  transform: scaleY(1.05);
}

.alerts-hist-bar:hover:not(.active) {
  opacity: 0.95;
  transform: scaleY(1.10);
}

.hist-empty {
  font-size: 12px;
  color: #888;
  margin: 6px 0;
}

/* Thin slider bar below histogram */
#alerts-date-slider {
  position: relative;
  height: 10px;
  background: #0e0f12;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin: 4px 0 14px 0;
}

#alerts-date-slider .slider-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}

#alerts-date-slider .slider-range {
  position: absolute;
  top: 0;
  height: 100%;
  background: linear-gradient(to right, #22c55e, #2563eb);
  border-radius: 8px;
  cursor: grab;
}
#alerts-date-slider .slider-range:active {
  cursor: grabbing;
}

.alerts-histogram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding: 0 4px;
  gap: 6px;
}

.alerts-histogram-title {
  font-size: 13px;
  color: #ccc;
  /* margin-bottom: 4px; */
  margin: 0;
  text-align: left;
  /* padding-left: 4px; */
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px; /* smaller gap than before */  
}

/* Histogram title + mode selector */
.alerts-histogram-title-row {
  display: flex;
  align-items: center;
  gap: 6px; /* 👈 tight spacing between text and dropdown */
}

.alerts-histogram-title select {
  height: 26px;
  padding: 2px 8px;
  font-size: 12px;
}

/* Match filter dropdown styling */
.histogram-mode-select {
  background: #1a1c22;
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 8px;      /* slightly tighter than filters */
  border-radius: 6px;
  color: #eee;
  font-size: 12px;
  cursor: pointer;
}

/* Optional hover/focus polish */
.histogram-mode-select:hover {
  border-color: rgba(255,255,255,0.3);
}

.histogram-mode-select:focus {
  outline: none;
  border-color: rgba(255,255,255,0.45);
}


#alerts-date-ticks {
  display: flex;
  gap: 0px;
  margin-top: 0px;
  margin-bottom: 15px;
  padding: 0 10px;
}

/* Midline guideline */
#alerts-date-histogram::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

/* Tick container vertical formatting */
.alerts-tick {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #aaa;
  opacity: 0.9;
  line-height: 10px;
  cursor: pointer;
  padding-top: 2px;
  user-select: none;
}

/* Two-line tick labels: MM (top), YY (bottom) */
.alerts-tick span {
  display: block;
}

/* Hover tooltip on tick */
.alerts-tick:hover {
  color: #fff;
}

.alerts-tick:hover:not(.active) {
  transform: scale(1.15);
  transition: transform 0.15s ease;
}

/* Active month highlight */
.alerts-tick.active {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.alerts-hist-bar.active {
  opacity: 1;
  /* transform: scaleY(1.08); */
  box-shadow: 0 0 6px rgba(255,255,255,0.25);
  outline: 2px solid rgba(255,255,255,0.25);
}

.alerts-hist-bar.active:hover {
  transform: none !important;
}

/* Scrollable alerts list wrapper */
#alerts-list-wrapper {
  max-height: calc(100vh - 380px);  /* responsive height */
  overflow-y: auto;
  padding-right: 6px; /* for nice scrollbar spacing */
}

#alerts-list-wrapper::-webkit-scrollbar {
  width: 8px;
}
#alerts-list-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}
#alerts-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.3);
}

#alerts-scroll-top {
  position: sticky;
  bottom: 10px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.25);
  color: #eee;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.15s ease;
}

#alerts-scroll-top:hover {
  background: rgba(255,255,255,0.20);
  transform: translateY(-2px);
}

.alerts-export-progress{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:12px;
  padding:10px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:10px;
  background: rgba(0,0,0,0.20);
}

.alerts-export-progress.hidden{ display:none; }

.spinner{
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,0.25);
  border-top-color: rgba(255,255,255,0.9);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.modal.modal-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  transform: translateY(-6px) scale(0.98);
  transition: transform 160ms ease;
}

.modal.modal-open .modal-content {
  transform: translateY(0) scale(1);
}

.modal.locked .close-btn {
  opacity: 0.3;
  pointer-events: none;
}

#alerts-export-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.35);
}

/* Checkbox next to UID row */
.alert-select-wrap {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.alert-select-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Make multi-selected cards subtly distinct */
.alert-card.multi-selected {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

/* Demo alert list cards, inherits styles from alert-card*/
#demo-alert-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

#demo-alert-select {
  min-width: 220px;
}

/* Bulk actions row (fits beside your export/zoom style buttons) */
.alerts-bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.9;
  width: 100%;
  margin-left: 0;
  margin: 8px 0 12px 0;        /* more space above histogram controls */
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;             /* prevents squishing on smaller widths */  
}

.bulk-label {
  margin-right: 8px;           /* keeps text away from dropdown */
}

.bulk-status-select {
  height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  background: #ffffff;
  color: #000000;
  border: 1px solid rgba(255,255,255,0.18);
}

.alerts-zoom-btn.secondary {
  opacity: 0.85;
}

/* --- Make the bulk dropdown match your pill buttons --- */
.alerts-bulk-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #eee;

  font-size: 12px;
  padding: 4px 28px 4px 10px;   /* extra right padding for arrow */
  border-radius: 999px;
  cursor: pointer;

  line-height: 1.2;
  min-width: 130px;
}

/* Try to force option menu to dark (browser-dependent) */
.alerts-bulk-select option {
  background: #111318;
  color: #eee;
}

/* --- Muliselect button --- */
#map-multiselect-btn.active,
#map-multiselect-btn[aria-pressed="true"] {
  background: rgba(120, 217, 139, 0.22);
  border-color: rgba(120, 217, 139, 0.75);
  color: #78d98b;
  box-shadow: 0 0 0 2px rgba(120, 217, 139, 0.18);
}

.multiselect-state {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 900;
}

#map-multiselect-btn.active .multiselect-state,
#map-multiselect-btn[aria-pressed="true"] .multiselect-state {
  color: #78d98b;
}
/* =========================================================
   RNC INTRO HERO OVERLAY
========================================================= */

.rnc-hero-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: flex-start;
  justify-content: center;

  padding: 2rem;

  overflow: hidden;

  background: rgba(2, 8, 6, 0.78);

  animation: rncHeroFadeIn 500ms ease both;
}

.rnc-hero-panel {
  position: relative;
  z-index: 2;

  width: min(860px, 88vw);
  max-height: min(620px, 76vh);

  border-radius: 22px;
  border: 1px solid rgba(120,217,139,0.34);

  background:
    linear-gradient(
      180deg,
      rgba(12, 28, 23, 0.72),
      rgba(4, 12, 10, 0.84)
    );

  box-shadow:
    0 40px 120px rgba(0,0,0,0.58),
    inset 0 1px 0 rgba(255,255,255,0.06);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  overflow: hidden;

  text-align: left;

  animation: rncHeroPanelIn 700ms cubic-bezier(.2,.8,.2,1) both;

  margin-top: clamp(1.5rem, 5vh, 4rem);  
}

.rnc-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;

  height: min(620px, 76vh);
  min-height: 0;
}

.rnc-hero-image {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.rnc-hero-image::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      90deg,
      transparent 45%,
      rgba(4,12,10,0.88) 100%
    );
}

.rnc-hero-image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  animation: rncHeroDrift 12000ms ease-in-out infinite alternate;
}

.rnc-hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: clamp(1.4rem, 3vw, 2.2rem);

  overflow-y: auto;
  min-height: 0;
}

.rnc-hero-content::-webkit-scrollbar {
  width: 8px;
}

.rnc-hero-content::-webkit-scrollbar-thumb {
  background: rgba(120,217,139,0.35);
  border-radius: 999px;
}

.rnc-hero-close {
  position: absolute;
  top: 14px;
  right: 15px;
  z-index: 5;

  border: 0;
  background: transparent;

  color: rgba(255,255,255,0.88);

  font-size: 2.2rem;
  line-height: 1;

  cursor: pointer;
}

.rnc-hero-icon {
  width: 3.4rem;
  height: 3.4rem;

  display: grid;
  place-items: center;

  margin: 0 0 1.2rem;

  border-radius: 999px;
  border: 1px solid rgba(120,217,139,0.55);

  color: #78d98b;
  font-size: 1.4rem;

  background: rgba(120,217,139,0.08);

  box-shadow: 0 0 36px rgba(120,217,139,0.18);
}

.rnc-hero-kicker {
  margin: 0 0 0.8rem;

  color: #78d98b;

  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rnc-hero-panel h1 {
  margin: 0 0 1.6rem;

  color: #fff;

  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.rnc-hero-panel h3 {
  font-size: clamp(0.95rem, 3vw, 1.25rem);
  line-height: 0.95;
  font-weight: 800;
}

.rnc-hero-content p {
  max-width: 58ch;

  margin: 0 0 1.2rem;

  color: rgba(255,255,255,0.84);

  font-size: 0.9rem;
  line-height: 1.65;
}

.rnc-hero-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);

  gap: 1.2rem;

  margin: 1.2rem 0;
}

.rnc-hero-features div {
  display: flex;
  align-items: center;
  gap: 0.8rem;

  color: rgba(255,255,255,0.92);
}

.rnc-hero-features span {
  color: #78d98b;
  font-size: 1.7rem;
}

.rnc-hero-features strong {
  line-height: 1.35;
}

.rnc-hero-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  align-self: flex-start;

  padding: 0.75rem 1.25rem;

  border: 0;
  border-radius: 12px;

  color: #fff;

  font: inherit;
  font-size: 1rem;
  font-weight: 900;


  background:
    linear-gradient(
      135deg,
      #1d7b46,
      #2f9657
    );

  box-shadow:
    0 18px 44px rgba(22, 116, 67, 0.38);

  cursor: pointer;
}

.rnc-hero-overlay.is-hidden {
  display: none;
  animation: rncHeroFadeOut 280ms ease forwards;
}

/* =========================================================
   RNC SIDEBAR FOOTER
========================================================= */
/* Viewport-pinned RNC sidebar buttons */
.rnc-sidebar-footer {
  position: fixed !important;

  left: 20px !important;
  bottom: 18px !important;

  width: 330px !important; /* sidebar 350px - left/right padding */

  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  z-index: 9999 !important;
}

/* Prevent sidebar content from hiding behind the fixed buttons */
.rnc-sidebar-content {
  padding-bottom: 95px !important;
}

/* Collapsed sidebar */
#sidebar.collapsed .rnc-sidebar-footer {
  display: none !important;
}

.forestinsights-footer-actions {
  margin-top: auto;
  padding-top: 16px;

  display: grid;
  grid-template-columns: 1fr 42px 1fr;
  gap: 10px;

  background: #111418;
  width: 100%;
}

.stats-panel {
  display: flex;
  flex-direction: column;
}

.stats-panel .tab-content.active {
  flex: 1 1 auto;
}

.map-toolbox {
  position: fixed;
  top: 84px;
  right: 420px;
  width: 265px;
  z-index: 99999;
  background: rgba(43, 43, 43, 0.96);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 12px 28px rgba(0,0,0,0.38);
  color: #e8e8e8;
  font-family: 'Inter', sans-serif;
}

.map-toolbox.hidden { display: none !important; }

.map-toolbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px 7px 10px;
  background: rgba(20,20,20,0.76);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.map-toolbox-close {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #ddd;
  font-size: 20px;
  cursor: pointer;
}

.map-toolbox-action,
.map-toolbox-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: #eee;
  font-size: 13px;
  padding: 7px 8px;
  margin: 0 0 6px;
  cursor: pointer;
}

.map-toolbox-menu {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.rnc-footer-button.icon-only {
  padding-left: 0;
  padding-right: 0;
  font-size: 17px;
}

.rnc-footer-button {
  min-width: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 3px;

  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);

  color: #edf6ef;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;

  cursor: pointer;
}

.rnc-footer-button:hover {
  border-color: rgba(120,217,139,0.38);
  color: #78d98b;
}

/* =========================================================
   RNC CONTACT POPUP
========================================================= */

.rnc-contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 2rem;

  background: rgba(2, 8, 6, 0.78);
  backdrop-filter: blur(10px);

  animation: rncHeroFadeIn 260ms ease both;
}

.rnc-contact-overlay.hidden {
  display: none;
}

.rnc-contact-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 2;

  width: 40px;
  height: 40px;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);

  color: #fff;
  font-size: 1.5rem;
  line-height: 1;

  cursor: pointer;
}

.rnc-contact-modal {
  position: relative;
  width: min(760px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
}

.rnc-contact-card {
  max-width: none;
  margin: 0;
  padding: clamp(1.75rem, 3vw, 2.6rem);
}

.rnc-contact-card .contact-card-header,
.rnc-contact-card .contact-form {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.rnc-contact-card .contact-form {
  margin-top: 1.5rem;
}

.rnc-contact-card .contact-form input,
.rnc-contact-card .contact-form select,
.rnc-contact-card .contact-form textarea {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.rnc-contact-card .contact-card-header h2 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.contact-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  border-radius: 28px;

  background:
    linear-gradient(
      180deg,
      rgba(18, 24, 22, 0.92),
      rgba(10, 14, 13, 0.96)
    );

  border: 1px solid rgba(120,217,139,0.12);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.03);

  color: #edf6ef;
}

.contact-card h2 {
  margin: 0 0 0.75rem;
  color: #78d98b;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.contact-card-header p {
  max-width: 78ch;
  color: rgba(237,246,239,0.74);
  line-height: 1.7;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.contact-form label {
  font-weight: 800;
  color: #edf6ef;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(120,217,139,0.18);
  background: rgba(2, 8, 16, 0.58);
  color: #edf6ef;
  font: inherit;
}

.contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-submit {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  padding: 0.85rem 1.1rem;
  border: 0;
  border-radius: 10px;

  background: #f4f7fb;
  color: #06130f;

  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 980px) {
  .rnc-hero-grid {
    grid-template-columns: 1fr;
  }

  .rnc-hero-image {
    height: 200px;
  }

  .rnc-hero-panel {
    max-height: 88vh;
  }
}

@keyframes rncHeroFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes rncHeroFadeOut {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@keyframes rncHeroPanelIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rncHeroDrift {
  from {
    transform: scale(1.02) translate3d(0,0,0);
  }

  to {
    transform: scale(1.06) translate3d(-1%, -0.5%, 0);
  }
}

/* =========================================================
   DASHBOARD TIP
========================================================= */

.dashboard-tip {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 999999 !important;

  max-width: 520px;
  width: calc(100% - 40px);
  padding: 12px 42px 12px 16px;

  background: rgba(17, 20, 24, 0.94);
  color: #eee;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);

  font-size: 13px;
  line-height: 1.4;
  pointer-events: auto;
}

.dashboard-tip.hidden {
  display: none !important;
}

.dashboard-tip-close {
  position: absolute;
  top: 7px;
  right: 10px;

  background: transparent;
  border: 0;
  color: #ccc;
  font-size: 20px;
  cursor: pointer;
}

.dashboard-tip-close:hover {
  color: #fff;
}

.dashboard-tip-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-tip-hand,
.dashboard-tip-icon {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Footer tooltip button */
#dashboard-tip-btn {
  min-width: 42px;
  padding: 0 12px;
  font-size: 16px;
}

/* White arrow with black border */
.ui-cursor-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M6 3 L25 16 L16.5 18.5 L21 28 L16.5 30 L12 20.5 L6 27 Z' fill='white' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ForestInsights specific sidebar */
.forestinsights-page #sidebar .layer-row label {
  display: flex;
  grid-template-columns: none;
  gap: 6px !important;
  align-items: center;
}

.forestinsights-page #sidebar {
  width: 350px !important;
  min-width: 350px !important;
}

.forestinsights-page #sidebar .layer-actions {
  margin-left: auto;
}


/* =========================================================
   Publish changes
========================================================= */
.publish-changes-btn {
  border-color: rgba(34, 197, 94, 0.65);
}

.publish-changes-btn:not(:disabled) {
  background: rgba(34, 197, 94, 0.18);
  color: #dfffe8;
}

.publish-changes-btn:disabled {
  opacity: 0.4;
}

/* =========================================================
   Review tab
========================================================= */
#review-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.review-summary-row {
  margin-bottom: 12px;
}

.review-alert-card {
  border-color: rgba(34, 197, 94, 0.35);
}

.review-alert-card .alert-card-header {
  gap: 10px;
}

.review-remove-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.review-remove-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.65);
}

.review-status-select {
  margin-left: auto;
  margin-right: 8px;
}
