/* Base */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Utility spacing (small subset) */
.mt-1 {
  margin-top: 6px;
}
.mt-2 {
  margin-top: 10px;
}
.mt-3 {
  margin-top: 14px;
}
.mb-1 {
  margin-bottom: 6px;
}
.mb-2 {
  margin-bottom: 10px;
}
.p-2 {
  padding: 8px;
}

/* ===== PAGE LAYOUT: description + map ===== */

/* Description section — normal flow, sits above the map */
#mapDescSection {
  flex-shrink: 0;
  background: linear-gradient(135deg, #1e3a5f 0%, #1a4a7a 60%, #1565c0 100%);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

/* Map area — fills remaining height, contains all absolutely-positioned UI */
main#mapPage {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 0;
}

.map-desc-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-desc-title {
  margin: 0 0 3px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.map-desc-text {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
  max-width: 760px;
}

.map-desc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.map-banner-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 3px 11px;
  font-size: 0.73rem;
  font-weight: 500;
  white-space: nowrap;
}

/* --- Map Container --- */
#mapContainer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transition: margin-left 0.3s ease-in-out;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@media (max-width: 640px) {
  .map-desc-inner {
    padding: 12px 14px 10px;
  }
  .map-desc-title {
    font-size: 0.95rem;
  }
  .map-desc-text {
    font-size: 0.78rem;
  }
  .map-banner-chip {
    font-size: 0.68rem;
    padding: 2px 8px;
  }
}

/* Accordion / collapses */
.accordion-toggle {
  /* background: #2a2a40; */
  background-color: #4f86c6;
  color: white;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin: 6px 0;
  display: block;
  line-height: 1.2;
}

.accordion-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accordion-toggle.active {
  /* background: #3a3a55; */
  color: #fff;
}
.collapse-panel {
  display: none;
  padding: 8px 10px;
}
.collapse-panel.active {
  display: block;
  background: transparent;
}

/* ── Data Layers Tab Panel — light theme override ── */
#toolsBox2 {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

.layer-tabs-panel {
  padding: 2px 0;
}

.layer-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.layer-panel-title svg {
  stroke: #4f86c6;
  flex-shrink: 0;
}

.layer-tab-btns {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid #e2e8f0;
}

.layer-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: none;
  border: none;
  border-radius: 7px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.18s,
    color 0.18s,
    box-shadow 0.18s;
  line-height: 1;
}

.layer-tab-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
}

.layer-tab-btn:hover {
  color: #1e293b;
  background: #e2e8f0;
}

.layer-tab-btn.active {
  background: #4f86c6;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 134, 198, 0.35);
}

/* Tab pane content */
.layer-tab-pane {
  display: none;
  flex-direction: column;
  gap: 2px;
}

.layer-tab-pane.active {
  display: flex;
}

.layer-tab-pane label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1e293b;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  margin: 0;
  border: 1px solid transparent;
}

.layer-tab-pane label:hover {
  background: #f0f7ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.layer-tab-pane label.label-info {
  color: #94a3b8;
  cursor: default;
  font-size: 12px;
  font-weight: 400;
}

.layer-tab-pane label.label-info:hover {
  background: none;
  border-color: transparent;
  color: #94a3b8;
}

.layer-tab-pane input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent; /* Base border for alignment */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.btn.sm {
  padding: 4px 8px;
  font-size: 13px;
}
.btn.primary {
  background-color: #007bff;
  color: #fff;
}
.btn.secondary {
  background-color: #6c757d;
  color: #fff;
}
.btn.success {
  background-color: #28a745;
  color: #fff;
}
.btn.warning {
  background-color: #ffc107;
  color: #000;
}
.btn.danger {
  background-color: #dc3545;
  color: #fff;
}
.btn.light {
  background: #fff;
  color: #000;
}
.btn.dark {
  background: #4f86c6;
  color: #fff;
}

/* Outline commen button */
.common-outline-btn-primary {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  padding: 3px 7px 3px 7px;
  border-radius: 5px;
}
.common-outline-btn-primary:hover {
  background-color: #007bff;
  color: #fff;
}

.common-outline-btn-warning {
  background-color: transparent;
  border: 1px solid #ffc107;
  color: #e7ad00;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  padding: 3px 7px 3px 7px;
  border-radius: 5px;
}
.common-outline-btn-warning:hover {
  background-color: #ffc107;
  color: #ffff;
}

.common-outline-btn-danger {
  background-color: transparent;
  border: 1px solid #dc3545;
  color: #dc3545;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  padding: 3px 7px 3px 7px;
  border-radius: 5px;
}
.common-outline-btn-danger:hover {
  background-color: #dc3545;
  color: #fff;
}

/* Outline Buttons */
.btn.outline-success {
  background-color: transparent;
  border: 1px solid #28a745;
  color: #28a745;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}
.btn.outline-success:hover {
  background-color: #28a745;
  color: #fff;
}

.btn-success {
  background-color: transparent;
  border: 1px solid #28a745;
  color: #0eba36;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  padding: 3px 7px 3px 7px;
  border-radius: 5px;
}
.btn-success:hover {
  background-color: #28a745;
  color: #fff;
}
.btn-secondary {
  background-color: transparent;
  border: 1px solid #2a332c;
  color: #2a332c;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  padding: 3px 7px 3px 7px;
  border-radius: 5px;
}
.btn-secondary:hover {
  background-color: #2a332c;
  color: #fff;
}

/* Inputs */
.form-input {
  width: 100%;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #cfcfcf;
  box-sizing: border-box;
}

/* Search container for icon */
.search-container {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none; /* So you can click through it */
}

/* Add padding to the input to make space for the icon */
#searchInput {
  padding-left: 35px !important;
}

/* Search results list item */
#searchResults {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  z-index: 2000;
}
#searchResults .list-item {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  background: #fff;
  color: #111;
}
#searchResults .list-item:hover {
  background: #f0f0f0;
}
#searchResults mark {
  background: #ffeb3b;
}

/* Tooltip base */
.toggle-btn {
  position: relative;
}

/* Tooltip text (hidden by default) */
.toggle-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px; /* distance below button */
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
}

/* Show on hover */
.toggle-btn:hover::after {
  opacity: 1;
}

/* Toggle button base style */
.toggle-btn {
  position: absolute;
  top: 5px;
  width: 35px;
  height: 35px;
  padding: 0;
  z-index: 900;
  border-radius: 8px;
  transition: all 0.25s ease;
  transform: scale(1);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Positioning for each toggle button */
#toggleBtn {
  left: 5px;
}
#toggleBtn1 {
  left: 45px;
}
#toggleBtn2 {
  left: 85px;
}

.toggle-btn.dark {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Highlight on hover */
.toggle-btn:hover {
  background: linear-gradient(135deg, #3570b0, #5b9bd5);
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(79, 134, 198, 0.5);
}

/* Style for SVG icons inside buttons */
.toggle-btn > svg {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  stroke: currentColor; /* Use the button's text color for the stroke */
  stroke-width: 2;
  fill: none; /* Ensure SVGs are not filled by default */
}

#toolsBox1,
#toolsBox2,
#toolsBox3 {
  display: none;
  position: absolute;
  top: 80px;
  left: 15px;
  width: 350px;
  background: #1e1e2f;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  padding: 12px;
  z-index: 1200;
  max-height: 75vh;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Show when active */
#toolsBox1.active,
#toolsBox2.active,
#toolsBox3.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.tools-menu1 {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tools-menu2 {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tools-menu3 {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Mapbox control look (small) */
.mapboxgl-ctrl-locate {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mapboxgl-ctrl-locate:hover {
  background: #f0f0f0;
}

/* Reset Button */
.reset-btn {
  position: absolute;
  top: 10px;
  right: 45px;
  background: #4f86c6;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 3;
  transition: all 0.25s ease;
}

/* Tooltip for reset button */
.reset-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 2000;
}
.reset-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  transform: scale(1.15);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
}
.reset-btn:hover::after {
  opacity: 1;
}

/* Coordinates */
#coords {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: #fff;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  z-index: 5;
  color: #000;
}

/* Basemap gallery */
#basemapGallery {
  position: absolute;
  bottom: 60px;
  right: 10px;
  z-index: 5;
}
#basemapBtn {
  background: #4f86c6;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100px;
}
.basemap-list {
  display: none;
  position: absolute;
  bottom: 50px;
  left: 20%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  width: 140px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  max-height: 250px;
  overflow-y: auto;
  -webkit-scrollbar: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.basemap-option {
  margin-bottom: 8px;
  text-align: center !important;
  cursor: pointer;
}
.basemap-option img {
  width: 100px;
  height: 60px;
  border-radius: 6px;
  border: 2px solid #ddd;
  margin-left: auto;
  margin-right: auto;
  transition: border 0.15s ease;
}
.basemap-option img:hover {
  border-color: #0078d7;
}
.basemap-option span {
  font-size: 12px;
  display: block;
  margin-top: 6px;
  color: #000 !important;
  text-align: center !important;
}

/* Popup styling */
.mapboxgl-popup {
  max-width: 620px !important;
  z-index: 10 !important;
}
.mapboxgl-popup-content {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  max-width: 610px;
  line-height: 1.4;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  max-height: 65vh;
}

/* Strip default padding when wrapping the form so form wrapper fills edge-to-edge */
.mapboxgl-popup-content:has(.popup-form-wrapper) {
  padding: 0 !important;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
  max-height: none;
}

/* Popup loading animation */
.popup-loader {
  padding: 8px 0;
}
.popup-loader-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.popup-loader-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #3b82f6, #8b5cf6);
  border-radius: 4px;
  animation: popupLoaderSlide 1.2s ease-in-out infinite;
}
@keyframes popupLoaderSlide {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}
.popup-content h5 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.price-row {
  /* background: #ecfff9; */
  background: #edfbfa;
  padding: 8px;
  border-left: 4px solid #30a586;
  border-radius: 6px;
  margin-bottom: 8px;
  color: #0e8c65;
}
.price-row span {
  font-weight: 600;
  color: #042744;
}
/* On small screens, take most of width */
@media (max-width: 600px) {
  .mapboxgl-popup-content {
    max-width: 90vw !important;
    font-size: 14px;
    /* padding: 12px; */
  }
}

/* badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.badge-primary {
  background: #007bff;
  color: #fff;
}
.badge-info {
  background: #d1ecf1;
  color: #0c5460;
}

/* popup actions */
.popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

/* ===== FORM OVERLAY (fixed in viewport, always fully visible) ===== */
.form-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: all;
}

/* ===== MAP FORM POPUP ===== */

.popup-form-wrapper {
  display: flex;
  flex-direction: column;
  width: 390px;
  max-width: 95vw;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow:
    0 8px 40px rgba(17, 70, 122, 0.18),
    0 2px 10px rgba(17, 70, 122, 0.1);
}

.popup-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1c4d7a, #2563eb);
  border-bottom: none;
  cursor: move;
  flex-shrink: 0;
}

.popup-form-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icon badge before title */
.popup-form-header h3::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

.popup-close-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  line-height: 1;
  padding: 5px 8px;
  transition: background 0.15s;
}

.popup-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.popup-close-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.popup-form-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 18px 10px;
  max-height: 38vh;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #4f86c6 #f1f5f9;
}

.popup-form-body::-webkit-scrollbar {
  width: 5px;
}

.popup-form-body::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 10px;
}

.popup-form-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4f86c6, #2563eb);
  border-radius: 10px;
}

.popup-form-footer {
  padding: 12px 18px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Cancel button */
.popup-form-footer .btn.secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1.5px solid #d5dfe8;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}

.popup-form-footer .btn.secondary:hover {
  background: #e2e8f0;
  border-color: #b0bec5;
  color: #1a2e3c;
}

.popup-form-footer .btn.secondary:active {
  background: #d5dfe8;
}

/* heatmap legend */
.heatmap-legend {
  position: absolute;
  bottom: 80px;
  left: 20px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  font-size: 13px;
}
.heatmap-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.heatmap-legend .legend-color {
  width: 18px;
  height: 18px;
  border-radius: 3px;
}

/* === Position Mapbox Geocoder === */
.mapboxgl-ctrl-geocoder {
  position: absolute !important;
  top: 0px; /* distance from top */
  right: 75px; /* distance from left */
  width: 100px;
  height: 35px;
  font-size: 12px;
  z-index: 9999;
  text-align: left;
}

.mapboxgl-ctrl-bottom-left {
  transition: left 0.3s ease-in-out;
  left: 10px; /* default position */
}

.sidebar.active ~ #mapContainer .mapboxgl-ctrl-bottom-left {
  left: 30px; /* shift when sidebar is open (≈ sidebar width + padding) */
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  /* Stack toggle buttons vertically */
  #toggleBtn {
    top: 10px;
    left: 10px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  #toggleBtn1 {
    top: 55px; /* move below first button */
    left: 10px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  #toggleBtn2 {
    top: 100px; /* move below second button */
    left: 10px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  /* Tools boxes take almost full width */
  #toolsBox1,
  #toolsBox2,
  #toolsBox3 {
    top: 150px;
    left: 10px;
    right: 10px;
    width: 300px;
    max-width: calc(100% - 20px);
    max-height: 60vh;
  }

  /* Geocoder shrinks */
  .mapboxgl-ctrl-geocoder {
    width: 200px !important;
    height: 40px !important;
    right: 80px !important;
    font-size: 14px !important;
    top: 0px !important; /* below buttons */
  }

  /* Reset button smaller */
  .reset-btn {
    top: 10px;
    right: 50px;
    width: 30px;
    height: 30px;
    font-size: 14px;
  }

  /* Coordinates smaller */
  #coords {
    font-size: 10px;
    padding: 4px 6px;
  }

  .basemap-list {
    max-height: 180px;
  }

  #basemapGallery {
    bottom: 20px;
    right: auto;
    left: 10px;
  }

  #basemapGallery .basemap-list {
    left: 0;
    right: auto;
    transform: none;
  }
}

/* --- Force consistent colors across light/dark browser modes --- */

/* General body background */
body {
  background: #fff !important;
  color: #000 !important;
}

/* Search results */
#searchResults,
#searchResults .list-item {
  background: #fff !important;
  color: #000 !important;
}

/* Popup box */
.mapboxgl-popup-content {
  background: #fff !important;
  color: #000 !important;
}
/* .mapboxgl-popup-content * {
  color: #000;
} */

/* Inputs (like search bar) */
.form-input,
#searchInput {
  background: #fff !important;
  color: #000 !important;
}

/* Heatmap legend */
.heatmap-legend {
  background: #fff !important;
  color: #000 !important;
}

/* Tools panels */
#toolsBox1,
#toolsBox2,
#toolsBox3 {
  background: #fff !important;
  color: #000 !important;
}

.mapboxgl-ctrl.mapboxgl-ctrl-group button {
  color: #000;
}
/* --- Force all text left aligned --- */

/* Global text */
body,
#searchResults,
#searchResults .list-item,
.mapboxgl-popup-content,
.form-input,
#searchInput,
.heatmap-legend,
#toolsBox1,
#toolsBox2,
#toolsBox3,
.mapboxgl-ctrl-geocoder {
  text-align: left !important;
}

/* --- Force black font for all tool texts --- */
.accordion-toggle,
.accordion-toggle *,
#toolsBox1 label,
#toolsBox2 label,
#toolsBox3 label,
#toolsBox1 .menu-text,
#toolsBox2 .menu-text,
#toolsBox3 .menu-text {
  text-align: left !important;
}

/* Form field label */
.field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #7a8fa6;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
}

/* Form field groups */
#featureForm .mb-2 {
  margin-bottom: 14px;
}

/* Clean form inputs */
#featureForm .form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #d5dfe8;
  border-radius: 8px;
  font-size: 12.5px;
  color: #1a2e3c;
  background: #f8fafc;
  box-shadow: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
  outline: none;
}

#featureForm .form-input:focus {
  border-color: #4f86c6;
  box-shadow: 0 0 0 3px rgba(79, 134, 198, 0.15);
  background: #ffffff;
  color: #1a2e3c;
}

/* Checkbox rows */
#featureForm label:has(input[type='checkbox']) {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  padding: 7px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  transition:
    border-color 0.15s,
    background 0.15s;
}

#featureForm label:has(input[type='checkbox']):active {
  background: #eef2ff;
  border-color: #4f86c6;
}

#featureForm input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

/* Save button */
.btn.success {
  background: linear-gradient(135deg, #2563eb, #1c4d7a);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
  transition:
    opacity 0.15s,
    box-shadow 0.15s;
  letter-spacing: 0.2px;
}

.btn.success:hover {
  opacity: 0.92;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn.success:active {
  opacity: 0.85;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
  color: #ffffff;
}
.mapboxgl-popup-close-button {
  display: none !important;
}

/* Default Mapbox close button hidden — custom close button used in popup header instead */
.mapboxgl-popup:not(:has(.popup-form-wrapper)) .mapboxgl-popup-close-button {
  display: none !important;
}

/* Main container for the actions menu */
.popup-content-actions {
  background-color: #ffffff;
  border-radius: 8px;
  color: #333;
  text-align: center;
  width: 150px;
}

.action-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.action-menu-title {
  font-size: 1.05em;
  font-weight: 600;
  color: #4f86c6;
  margin: 0;
}

.action-close-btn {
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  flex-shrink: 0;
  transition:
    background 0.15s,
    color 0.15s;
}
.action-close-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Space between buttons */
}

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

.action-button i {
  margin-right: 8px;
  font-size: 1.1em;
}

/* --- Primary Action (Verify Property) --- */
.primary-action {
  background-color: #4f86c6;
  color: #ffffff;
  box-shadow: rgba(79, 134, 198, 0.3) 0px 4px 10px -3px;
}

.primary-action:hover {
  background-color: #3570b0;
  transform: translateY(-1px);
  box-shadow: rgba(79, 134, 198, 0.4) 0px 6px 12px -4px;
}

.primary-action:active {
  background-color: #4f86c6;
  transform: translateY(0);
  box-shadow: none;
}

/* --- Secondary Action (List Property) --- */
.secondary-action {
  background-color: #f1f5f9; /* Light Gray */
  color: #333;
  border: 1px solid #cbd5e1;
}

.secondary-action:hover {
  background-color: #e2e8f0; /* Slightly darker gray */
  transform: translateY(-1px);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}

.secondary-action:active {
  background-color: #cbd5e1; /* Even darker gray */
  transform: translateY(0);
  box-shadow: none;
}

/* Map Legend Box */
.map-keys-box {
  position: absolute;
  bottom: 110px;
  right: 10px;
  background: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  z-index: 4;
  display: flex;
  width: 155px;
  flex-direction: column;
  gap: 8px;
  color: #111;
}

.map-keys-box .legend-sections {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 300px;
}

.map-keys-box.legend-collapsed .legend-sections {
  max-height: 0;
}

.legend-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #374151;
  margin-bottom: 2px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 5px;
}

.legend-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 5px;
  margin-bottom: 0;
}

.legend-collapsed #legendChevron {
  transform: rotate(-90deg);
}

@media (max-width: 640px) {
  .map-keys-box {
    bottom: 20px;
    right: 8px;
    width: 140px;
    padding: 8px 10px;
    max-height: 60vh;
    overflow-y: auto;
  }
  .map-keys-box .legend-sections {
    max-height: 50vh;
    overflow-y: auto;
  }
  .map-keys-box.legend-collapsed .legend-sections {
    max-height: 0;
    overflow: hidden;
  }
}

.legend-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.legend-section-label {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 1px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: #374151;
}

/* Teardrop map-pin shape */
.legend-pin {
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Circle dot for circle-layer markers */
.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/*Popup Card Styling */
.popup-card {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  color: #333;
  max-width: 350px;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.popup-header h4 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  color: #1a202c;
  text-transform: capitalize;
}

.price {
  font-size: 1.1em;
  font-weight: 800;
  color: #38a169;
  background-color: #f0fff4;
  padding: 4px 4px;
  border-radius: 8px;
}

.address {
  font-size: 1em;
  color: #718096;
  margin-bottom: 12px;
  line-height: 1.4;
}

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.95em;
  margin-bottom: 16px;
}

.details p {
  margin: 0;
  background-color: #f7fafc;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #edf2f7;
  color: #4a5568;
}

.details p strong {
  color: #2d3748;
  font-weight: 600;
}

.desc {
  font-size: 0.9em;
  color: #4a5568;
  line-height: 1.6;
  margin-top: 16px;
  background-color: #f7fafc;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #edf2f7;
}

/* Responsive adjustments for the popup card */
@media (max-width: 768px) {
  .popup-card {
    max-width: 220px;
    padding: 15px;
  }

  .popup-header h4 {
    font-size: 1.1em;
  }

  .price {
    font-size: 1em;
  }

  .details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .popup-card {
    max-width: 220px;
    padding: 10px;
  }

  .popup-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .popup-header h4 {
    font-size: 1em;
  }

  .price {
    font-size: 0.9em;
    align-self: flex-end;
  }

  .address {
    font-size: 0.9em;
  }

  .details {
    font-size: 0.85em;
  }

  .desc {
    font-size: 0.8em;
  }
}

/* Remove default mapbox popup styles */
/* .mapboxgl-popup-content {
  padding: 0;
  background: transparent;
  box-shadow: none;
} */

/* New styles for the attractive popup */
.custom-popup-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;

  width: 560px;
  max-width: 95vw;
  overflow: visible;

  border-top: 3px solid #4f86c6;
}

/* Small screens (phones) */
@media (max-width: 480px) {
  .custom-popup-card {
    width: 100%;
    max-height: 85vh; /* Better fit on small devices */
    border-radius: 10px;
  }
}

.custom-popup-card .custom-popup-header {
  background-color: #f3f4f6;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
}

.custom-popup-card .custom-popup-header h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #4f86c6;
}

.custom-popup-card .custom-popup-header .badge {
  background-color: #ecfdf5;
  color: #065f46;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.custom-popup-card .custom-popup-body {
  padding: 5px 12px 8px;
}

.custom-popup-card .info-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.custom-popup-card .info-row:last-child {
  border-bottom: none;
}

.custom-popup-card .info-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 500;
}

.custom-popup-card .info-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  text-align: right;
  white-space: nowrap;
  /* overflow: hidden; */
  /* text-overflow: ellipsis; */
}

/* ===== RENTAL RATES SECTION ===== */
.rental-rates-section {
  margin: 8px 0 4px;
  border: 1px solid #e0edff;
  border-radius: 8px;
  overflow: hidden;
}

.rental-rates-title {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1d4ed8;
  border-bottom: 1px solid #dbeafe;
}

.rental-rates-grid {
  padding: 4px 0;
}

.rental-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  border-bottom: 1px dashed #e5e7eb;
}

.rental-row:last-child {
  border-bottom: none;
}

.rental-type {
  font-size: 0.78rem;
  font-weight: 600;
  color: #374151;
  min-width: 60px;
}

.rental-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: #059669;
}

/* ===== RESPONSIVE POPUP CARD ===== */

/* Mobile base */
.custom-popup-card {
  width: 300px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1) !important;
  border-top: 3px solid #4f86c6 !important;
  font-size: 12px !important;
  opacity: 1;
}

/* Very small mobile */
@media (max-width: 375px) {
  .custom-popup-card {
    width: 270px !important;
    font-size: 11.5px !important;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .custom-popup-card {
    width: 420px !important;
    font-size: 13px !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12) !important;
    border-top: 3px solid #4f86c6 !important;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .custom-popup-card {
    width: 520px !important;
    font-size: 13.5px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
    border-top: 3px solid #4f86c6 !important;
  }
}

/* Large desktop */
@media (min-width: 1440px) {
  .custom-popup-card {
    width: 580px !important;
    font-size: 14px !important;
  }
}

/* Popup header responsive */
.custom-popup-card .custom-popup-header {
  background: linear-gradient(135deg, #4f86c6 0%, #5b9bd5 100%) !important;
  padding: 7px 12px !important;
  border-bottom: none !important;
}

@media (min-width: 768px) {
  .custom-popup-card .custom-popup-header {
    padding: 8px 13px !important;
  }
}

@media (min-width: 1024px) {
  .custom-popup-card .custom-popup-header {
    padding: 9px 14px !important;
  }
}

.custom-popup-card .custom-popup-header h4 {
  font-size: 0.85rem !important;
  color: white !important;
  font-weight: 700 !important;
}

@media (min-width: 768px) {
  .custom-popup-card .custom-popup-header h4 {
    font-size: 0.92rem !important;
  }
}

@media (min-width: 1024px) {
  .custom-popup-card .custom-popup-header h4 {
    font-size: 1rem !important;
  }
}

.custom-popup-card .custom-popup-header .badge {
  background-color: rgba(255, 255, 255, 0.22) !important;
  color: white !important;
  padding: 2px 7px !important;
  font-size: 0.6rem !important;
  backdrop-filter: blur(5px);
}

@media (min-width: 768px) {
  .custom-popup-card .custom-popup-header .badge {
    padding: 3px 8px !important;
    font-size: 0.65rem !important;
  }
}

/* Accordion Container */
.accordion-container-prominent {
  width: 100%;
}

/* Minimal Accordion Items on mobile */
.accordion-item-prominent {
  border-bottom: 1px solid #f0f0f0; /* Lighter border */
  transition: all 0.2s ease;
}

.accordion-item-prominent:last-child {
  border-bottom: none;
}

.accordion-item-prominent.electricity-section {
  border-left: 2px solid #f59e0b;
}

.accordion-item-prominent.location-section {
  border-left: 2px solid #3b82f6;
}

.accordion-item-prominent.tax-section {
  border-left: 2px solid #10b981;
}

@media (min-width: 1024px) {
  .accordion-item-prominent {
    border-bottom: 1px solid #e5e7eb;
  }

  .accordion-item-prominent.electricity-section,
  .accordion-item-prominent.location-section,
  .accordion-item-prominent.tax-section {
    border-left-width: 3px;
  }
}

/* Very compact header on mobile */
.accordion-header-prominent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
  position: relative;
}

@media (min-width: 768px) {
  .accordion-header-prominent {
    padding: 9px 12px;
  }
}

@media (min-width: 1024px) {
  .accordion-header-prominent {
    padding: 11px 14px;
  }
}

.accordion-header-prominent:hover {
  background: #fafafa; /* Subtle hover */
}

@media (min-width: 768px) {
  .accordion-header-prominent:hover {
    background: #f9fafb;
  }
}

.accordion-header-prominent::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: transparent;
  transition: background 0.2s;
}

.accordion-item-prominent.expanded .accordion-header-prominent::before {
  background: #6d28d9;
}

/* Minimal title on mobile */
.accordion-title-prominent {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .accordion-title-prominent {
    gap: 9px;
  }
}

@media (min-width: 1024px) {
  .accordion-title-prominent {
    gap: 10px;
  }
}

.accordion-icon-prominent {
  font-size: 1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.08));
}

@media (min-width: 768px) {
  .accordion-icon-prominent {
    font-size: 1.2rem;
  }
}

@media (min-width: 1024px) {
  .accordion-icon-prominent {
    font-size: 1.4rem;
  }
}

/* Icon wrapper for SVG icons in accordion headers */
.icon-wrapper {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
}

@media (min-width: 768px) {
  .icon-wrapper {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }
}

@media (min-width: 1024px) {
  .icon-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
}

.electricity-icon {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}
.location-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}
.tax-icon {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}
.wind-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}
.earthquake-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.main-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: normal; /* allow wrapping */
  word-break: break-word;
}

@media (min-width: 768px) {
  .main-title {
    font-size: 0.8rem;
  }
}

@media (min-width: 1024px) {
  .main-title {
    font-size: 0.9rem;
  }
}

.sub-title {
  display: flex;
  flex-direction: column; /* stack each item on its own line */
  gap: 2px;
  font-size: 0.62rem;
  color: #6b7280;
  font-weight: 500;
  line-height: 1.3;
}

/* Keep badge + separator + text inline but wrap naturally */
.sub-title > * {
  display: inline;
}

.sub-title .separator {
  display: none; /* hide separator since items are stacked */
}

@media (min-width: 768px) {
  .sub-title {
    flex-direction: row; /* back to row on tablet+ */
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    font-size: 0.65rem;
  }
  .sub-title .separator {
    display: inline;
  }
}

@media (min-width: 1024px) {
  .sub-title {
    font-size: 0.7rem;
  }
}

.coming-soon-text {
  color: #f59e0b;
  font-weight: 600;
}

/* Minimal arrow on mobile */
.accordion-arrow-prominent {
  font-size: 8px;
  color: #9ca3af; /* Lighter */
  font-weight: normal;
  transition: transform 0.2s ease;
  padding: 2px 4px;
  background: #f9fafb;
  border-radius: 3px;
}

@media (min-width: 768px) {
  .accordion-arrow-prominent {
    font-size: 9px;
    color: #6d28d9;
    font-weight: bold;
    padding: 3px 5px;
  }
}

@media (min-width: 1024px) {
  .accordion-arrow-prominent {
    font-size: 10px;
    padding: 3px 6px;
  }
}

.accordion-item-prominent.expanded .accordion-arrow-prominent {
  transform: rotate(180deg);
  background: #e0e7ff; /* Lighter on mobile */
  color: #6d28d9;
}

@media (min-width: 768px) {
  .accordion-item-prominent.expanded .accordion-arrow-prominent {
    background: #6d28d9;
    color: white;
  }
}

/* Admin action buttons inside locality popup */
.popup-admin-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px dashed #e5e7eb;
  margin-top: 4px;
}

.popup-admin-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}

.edit-btn {
  background: #eef4fc;
  color: #4f86c6;
}
.edit-btn:hover {
  background: #ddeaf8;
}

.move-btn {
  background: #f0fdf4;
  color: #16a34a;
}
.move-btn:hover {
  background: #dcfce7;
}

/* Compact body on mobile */
.accordion-body-prominent {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  background: #fafafa; /* Lighter */
}

@media (min-width: 768px) {
  .accordion-body-prominent {
    background: #f9fafb;
  }
}

.accordion-item-prominent.expanded .accordion-body-prominent {
  max-height: 600px;
  padding: 8px 10px;
}

@media (min-width: 768px) {
  .accordion-item-prominent.expanded .accordion-body-prominent {
    max-height: 700px;
    padding: 10px 12px;
  }
}

@media (min-width: 1024px) {
  .accordion-item-prominent.expanded .accordion-body-prominent {
    max-height: 800px;
    padding: 12px 14px;
  }
}

/* Minimal provider list */
.providers-list-prominent {
  display: flex;
  flex-direction: column;
  gap: 4px; /* Tight */
}

@media (min-width: 768px) {
  .providers-list-prominent {
    gap: 6px;
  }
}

@media (min-width: 1024px) {
  .providers-list-prominent {
    gap: 7px;
  }
}

.provider-section-prominent {
  background: white;
  border: 1px solid #f0f0f0; /* Lighter border */
  border-radius: 5px;
  overflow: hidden;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .provider-section-prominent {
    border-color: #e5e7eb;
    border-radius: 6px;
  }
}

.provider-section-prominent:hover {
  border-color: #c4b5fd; /* Lighter hover */
  box-shadow: 0 1px 4px rgba(109, 40, 217, 0.05);
}

@media (min-width: 768px) {
  .provider-section-prominent:hover {
    border-color: #6d28d9;
    box-shadow: 0 2px 8px rgba(109, 40, 217, 0.08);
  }
}

.provider-header-prominent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px; /* Very tight */
  background: #fffbeb; /* Lighter gradient */
  cursor: pointer;
  transition: all 0.2s;
}

@media (min-width: 768px) {
  .provider-header-prominent {
    padding: 6px 8px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  }
}

@media (min-width: 1024px) {
  .provider-header-prominent {
    padding: 7px 10px;
  }
}

.provider-header-prominent:hover {
  background: #fef9c3;
}

@media (min-width: 768px) {
  .provider-header-prominent:hover {
    background: linear-gradient(135deg, #fef9c3 0%, #fef3c7 100%);
  }
}

.provider-info {
  display: flex;
  align-items: center;
  gap: 4px;
}

@media (min-width: 768px) {
  .provider-info {
    gap: 6px;
  }
}

@media (min-width: 1024px) {
  .provider-info {
    gap: 7px;
  }
}

.provider-dot {
  width: 3px;
  height: 3px;
  background: #fbbf24; /* Lighter */
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}

@media (min-width: 768px) {
  .provider-dot {
    width: 4px;
    height: 4px;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  }
}

@media (min-width: 1024px) {
  .provider-dot {
    width: 5px;
    height: 5px;
  }
}

.provider-name-prominent {
  font-size: 0.65rem;
  font-weight: 600; /* Less bold */
  color: #b45309; /* Softer */
  line-height: 1.2;
}

@media (min-width: 768px) {
  .provider-name-prominent {
    font-size: 0.7rem;
    font-weight: 700;
    color: #92400e;
  }
}

@media (min-width: 1024px) {
  .provider-name-prominent {
    font-size: 0.8rem;
  }
}

.toggle-icon-prominent {
  font-size: 7px;
  color: #fbbf24; /* Lighter */
  font-weight: normal;
  transition: transform 0.2s;
}

@media (min-width: 768px) {
  .toggle-icon-prominent {
    font-size: 8px;
    color: #f59e0b;
    font-weight: bold;
  }
}

@media (min-width: 1024px) {
  .toggle-icon-prominent {
    font-size: 9px;
  }
}

.provider-section-prominent.expanded .toggle-icon-prominent {
  transform: rotate(180deg);
}

.provider-content-prominent {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.provider-section-prominent.expanded .provider-content-prominent {
  max-height: 250px;
}

@media (min-width: 768px) {
  .provider-section-prominent.expanded .provider-content-prominent {
    max-height: 320px;
  }
}

@media (min-width: 1024px) {
  .provider-section-prominent.expanded .provider-content-prominent {
    max-height: 380px;
  }
}

/* Minimal tariff rows */
.tariff-row-prominent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  border-bottom: 1px solid #fafafa;
  transition: background 0.2s;
}

@media (min-width: 768px) {
  .tariff-row-prominent {
    padding: 5px 8px;
    border-bottom: 1px solid #f3f4f6;
  }
}

@media (min-width: 1024px) {
  .tariff-row-prominent {
    padding: 7px 10px;
  }
}

.tariff-row-prominent:hover {
  background: #fffbeb;
}

@media (min-width: 768px) {
  .tariff-row-prominent:hover {
    background: #fefce8;
  }
}

.tariff-row-prominent:last-child {
  border-bottom: none;
}

.tariff-cat-prominent {
  font-size: 0.6rem;
  color: #6b7280; /* Softer */
  font-weight: 500;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .tariff-cat-prominent {
    font-size: 0.65rem;
    color: #374151;
    font-weight: 600;
  }
}

@media (min-width: 1024px) {
  .tariff-cat-prominent {
    font-size: 0.75rem;
  }
}

.tariff-rate-prominent {
  font-size: 0.65rem;
  color: #8b5cf6; /* Lighter purple */
  font-weight: 600;
  background: #f5f3ff; /* Lighter background */
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .tariff-rate-prominent {
    font-size: 0.7rem;
    color: #6d28d9;
    font-weight: 700;
    background: linear-gradient(135deg, #ede9fe 0%, #f3f4f6 100%);
    padding: 3px 6px;
    border-radius: 4px;
  }
}

@media (min-width: 1024px) {
  .tariff-rate-prominent {
    font-size: 0.8rem;
    padding: 4px 7px;
  }
}

/* Minimal location grid */
.location-grid-prominent {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

@media (min-width: 768px) {
  .location-grid-prominent {
    gap: 6px;
  }
}

@media (min-width: 1024px) {
  .location-grid-prominent {
    gap: 7px;
  }
}

.location-card {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 5px 6px;
  border-radius: 5px;
  border: 1px solid #f0f0f0;
  transition: all 0.2s ease;
}

@media (min-width: 768px) {
  .location-card {
    padding: 7px 8px;
    gap: 8px;
    border-color: #e5e7eb;
    border-radius: 6px;
  }
}

@media (min-width: 1024px) {
  .location-card {
    padding: 9px 10px;
    gap: 10px;
  }
}

.location-card:hover {
  border-color: #93c5fd; /* Lighter */
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.05);
}

@media (min-width: 768px) {
  .location-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
  }
}

.location-icon {
  font-size: 1rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.06));
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .location-icon {
    font-size: 1.3rem;
  }
}

@media (min-width: 1024px) {
  .location-icon {
    font-size: 1.5rem;
  }
}

.location-details {
  flex: 1;
  min-width: 0;
}

.location-label {
  font-size: 0.5rem;
  color: #9ca3af; /* Lighter */
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 1px;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .location-label {
    font-size: 0.55rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 2px;
  }
}

@media (min-width: 1024px) {
  .location-label {
    font-size: 0.6rem;
  }
}

.location-value {
  font-size: 0.7rem;
  font-weight: 600; /* Less bold */
  color: #374151; /* Softer */
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .location-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
  }
}

@media (min-width: 1024px) {
  .location-value {
    font-size: 0.85rem;
    white-space: normal;
  }
}

/* Minimal placeholder */
.placeholder-prominent {
  text-align: center;
  padding: 12px 10px;
  background: white;
  border-radius: 6px;
  border: 1px dashed #e5e7eb; /* Lighter */
}

@media (min-width: 768px) {
  .placeholder-prominent {
    padding: 15px 12px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
  }
}

@media (min-width: 1024px) {
  .placeholder-prominent {
    padding: 18px 14px;
  }
}

.placeholder-icon-prominent {
  font-size: 1.5rem;
  margin-bottom: 6px;
  opacity: 0.3; /* Very light */
  filter: grayscale(100%);
}

@media (min-width: 768px) {
  .placeholder-icon-prominent {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.4;
  }
}

@media (min-width: 1024px) {
  .placeholder-icon-prominent {
    font-size: 2.5rem;
    margin-bottom: 10px;
  }
}

.placeholder-title {
  font-size: 0.7rem;
  font-weight: 600; /* Less bold */
  color: #6b7280; /* Softer */
  margin-bottom: 3px;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .placeholder-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
  }
}

@media (min-width: 1024px) {
  .placeholder-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }
}

.placeholder-desc {
  font-size: 0.6rem;
  color: #9ca3af; /* Lighter */
  line-height: 1.3;
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .placeholder-desc {
    font-size: 0.65rem;
    color: #6b7280;
    margin-bottom: 10px;
  }
}

@media (min-width: 1024px) {
  .placeholder-desc {
    font-size: 0.72rem;
    line-height: 1.4;
    margin-bottom: 12px;
  }
}

.preview-section {
  background: #fafafa;
  padding: 6px;
  border-radius: 4px;
  margin-top: 6px;
  text-align: left;
}

@media (min-width: 768px) {
  .preview-section {
    background: #f9fafb;
    padding: 8px;
    margin-top: 8px;
  }
}

@media (min-width: 1024px) {
  .preview-section {
    padding: 10px;
    margin-top: 10px;
  }
}

.preview-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .preview-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 5px;
  }
}

@media (min-width: 1024px) {
  .preview-label {
    font-size: 0.65rem;
    margin-bottom: 6px;
  }
}

.preview-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

@media (min-width: 768px) {
  .preview-items {
    gap: 3px;
  }
}

@media (min-width: 1024px) {
  .preview-items {
    gap: 4px;
  }
}

.preview-item {
  font-size: 0.6rem;
  color: #6b7280; /* Softer */
  padding-left: 3px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .preview-item {
    font-size: 0.65rem;
    color: #374151;
    padding-left: 4px;
  }
}

@media (min-width: 1024px) {
  .preview-item {
    font-size: 0.7rem;
    padding-left: 5px;
  }
}

/* Minimal scrollbar on mobile */
.custom-popup-card::-webkit-scrollbar {
  width: 3px;
}

@media (min-width: 768px) {
  .custom-popup-card::-webkit-scrollbar {
    width: 4px;
  }
}

@media (min-width: 1024px) {
  .custom-popup-card::-webkit-scrollbar {
    width: 5px;
  }
}

.custom-popup-card::-webkit-scrollbar-track {
  background: #fafafa;
}

@media (min-width: 768px) {
  .custom-popup-card::-webkit-scrollbar-track {
    background: #f3f4f6;
  }
}

.custom-popup-card::-webkit-scrollbar-thumb {
  background: #a8c4e0;
  border-radius: 10px;
}

@media (min-width: 768px) {
  .custom-popup-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4f86c6 0%, #5b9bd5 100%);
  }
}

.custom-popup-card::-webkit-scrollbar-thumb:hover {
  background: #3570b0;
}

@media (min-width: 768px) {
  .custom-popup-card::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3570b0 0%, #4f86c6 100%);
  }
}

/* Touch devices - Better tap targets */
@media (hover: none) and (pointer: coarse) {
  .accordion-header-prominent {
    padding: 8px 10px;
  }

  .provider-header-prominent {
    padding: 6px 8px;
  }

  .accordion-arrow-prominent {
    padding: 4px 6px;
  }

  .location-card {
    padding: 8px;
  }
}

/* Animations - Subtle on mobile */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.accordion-item-prominent.expanded .accordion-body-prominent {
  animation: slideIn 0.2s ease-out;
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .custom-popup-card {
    max-height: 75vh !important;
    width: 220px !important;
  }

  .accordion-item-prominent.expanded .accordion-body-prominent {
    max-height: 600px;
  }
}

/* Portrait mobile optimization */
@media (max-width: 480px) and (orientation: portrait) {
  .custom-popup-card {
    max-height: 80vh !important; /* Allow scrolling to see all content */
  }
}

/* Row */
.info-row-down {
  margin-bottom: 12px;
}

/* Heading text (Electricity Pricing, Property Taxes, etc.) */
.info-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px; /* space between heading and boxes */
}

/* Wrapper for the boxes */
.info-boxes {
  display: flex;
  justify-content: flex start;
  gap: 5px;
  /* flex-wrap: nowrap; */
}

/* Each small box */
.info-box {
  flex: auto;
  background: #f6f6f9;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 4px 5px;
  text-align: center; /* center the text inside */
}

/* Value (TATA Power, ₹40, KWH) */
.info-box-value {
  font-size: 10px;
  font-weight: 700;
  color: #222;
}

/* Label (Rate, Type, etc.) */
.info-box-label {
  font-size: 8px;
  margin-top: 3px;
  color: #666;
  font-weight: 500;
}

/* Tax Summary Grid */
.tax-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

@media (min-width: 480px) {
  .tax-summary-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
}

.tax-summary-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 8px;
  transition: all 0.2s ease;
}

.tax-summary-card.highlight {
  background: #e7f3ff;
  border-color: #0066cc;
}

.tax-summary-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.tax-card-label {
  font-size: 10px;
  color: #6c757d;
  font-weight: 500;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tax-card-value {
  font-size: 14px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 2px;
  line-height: 1.2;
}

.tax-card-value.primary {
  color: #0066cc;
  font-size: 14px;
}

.tax-card-meta {
  font-size: 10px;
  color: #868e96;
}

/* Tax Breakdown Section */
.tax-breakdown-section {
  background: #f8f9fa;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  color: #495057;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.section-header svg {
  color: #0066cc;
  width: 12px !important;
  height: 12px !important;
}

.tax-breakdown-list {
  background: white;
  border-radius: 5px;
  padding: 4px 7px;
  margin-bottom: 0;
}

.tax-breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f5;
}

.tax-breakdown-item:last-child {
  border-bottom: none;
}

.breakdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #495057;
}

.breakdown-dot {
  width: 5px;
  height: 5px;
  background: #0066cc;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-value {
  font-size: 11px;
  font-weight: 600;
  color: #212529;
}

.tax-breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #0066cc;
}

.tax-breakdown-total .breakdown-label {
  font-weight: 600;
  color: #212529;
}

.tax-breakdown-total .breakdown-value.total {
  font-size: 13px;
  color: #0066cc;
}

/* Payment Section */
.tax-payment-section {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
}

.tax-payment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

@media (min-width: 480px) {
  .tax-payment-grid {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }
}

.payment-info-item {
  padding: 8px 10px;
  background: #f8f9fa;
  border-radius: 5px;
}

.payment-label {
  font-size: 10px;
  color: #6c757d;
  margin-bottom: 3px;
  font-weight: 500;
}

.payment-value {
  font-size: 12px;
  font-weight: 600;
  color: #212529;
}

.payment-value.highlight {
  color: #dc3545;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.status-badge.status-paid {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-active {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-overdue {
  background: #f8d7da;
  color: #721c24;
}

.separator {
  color: #dee2e6;
  margin: 0 3px;
}

/* Demo Notice */
.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 8px;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 6px;
  font-size: 10px;
  color: #856404;
  line-height: 1.4;
  margin-top: 5px;
}

.demo-notice svg {
  flex-shrink: 0;
  margin-top: 1px;
  width: 12px !important;
  height: 12px !important;
}

.tax-content-prominent {
  padding: 4px 0;
}

/* Inline rate rows */
.tax-rate-rows {
  margin-bottom: 10px;
}

.tax-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 5px;
  border-left: 3px solid #e9ecef;
}

.tax-rate-row:first-child {
  border-left-color: #0066cc;
  background: #f0f7ff;
}

.tax-rate-label {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
}

.tax-rate-value {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
}

.tax-rate-value.highlight {
  color: #0066cc;
}

/* Wind Risk Section */
.wind-section .wind-icon {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}

.status-badge.status-moderate {
  background-color: #fef3c7;
  color: #92400e;
}

/* Earthquake Risk Section */
.earthquake-section .earthquake-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.status-badge.status-low {
  background-color: #d1fae5;
  color: #065f46;
}
