/* ============================================
   CSS Design Tokens & Variables
   (aligned with change-requests cyan/teal console)
   ============================================ */
:root {
  /* App shell */
  --app-bg: #020508;
  --app-bg-glow:
    radial-gradient(circle at 12% 0%, rgba(8, 145, 178, 0.14), transparent 28rem),
    radial-gradient(circle at 92% 20%, rgba(20, 184, 166, 0.08), transparent 30rem),
    #020508;

  /* Panel Colors */
  --panel-bg-primary: rgba(5, 10, 16, 0.92);
  --panel-bg-secondary: rgba(8, 15, 23, 0.94);
  --panel-border-color: rgba(148, 163, 184, 0.16);
  --panel-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
  --panel-shadow-inner: inset 0 1px rgba(255, 255, 255, 0.035);
  --panel-shadow-colored: 0 0 20px rgba(34, 211, 238, 0.08);
  --panel-accent-color: #22d3ee;
  --panel-accent-hover: #06b6d4;
  --panel-accent-soft: rgba(34, 211, 238, 0.1);
  --panel-accent-strong: #06b6d4;
  
  /* Panel Spacing */
  --panel-padding: 16px;
  --panel-gap: 12px;
  --panel-border-radius: 12px;
  --panel-header-padding: 12px 16px;
  --panel-button-padding: 12px 16px;
  
  /* Panel Animations */
  --panel-transition-duration: 300ms;
  --panel-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, rgba(8, 145, 178, 0.28), rgba(15, 118, 110, 0.18));
  --gradient-bg: linear-gradient(135deg, rgba(5, 10, 16, 0.95), rgba(8, 15, 23, 0.9));
  --gradient-title: linear-gradient(135deg, rgba(8, 145, 178, 0.35), rgba(6, 182, 212, 0.18));
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-kicker: #67e8f9;
  --text-success: #2dd4bf;

  /* Typography */
  --font-sans: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html,
body {
  font-family: var(--font-sans);
  background: var(--app-bg);
  color: var(--text-primary);
}

.dashboard {
  background: var(--app-bg-glow) !important;
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
}

.dashboard .row.flex-grow-1 {
  min-height: 0;
}

.dashboard > .row.flex-grow-1 > [class*="col-"] {
  min-height: 0;
  min-width: 0;
}

/* Global map styles */
#map {
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor:default
}

/* Map area */
.map-area {
  position: relative;
  
}

/* Map Expand Button */
.map-area .expand-btn {
  position: absolute;
  top: 0px;
  right: 0px; /* Left of toolbar at right: 10px */
  background: #000000;
  border: none;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
  z-index: 1001; /* Above map */
}

.map-area .expand-btn:hover {
  background: #333333;
}

/* Fullscreen Map Container */
.fullscreen-map-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000000;
  z-index: 2000;
  flex-direction: column;
}

.fullscreen-map-container.active {
  display: flex;
}

.fullscreen-map-content {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  position: relative;
}

.fullscreen-map-container #map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.fullscreen-map-close-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #000000;
  border: none;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  font-size: 18px;
  color: #ffffff;
}

.fullscreen-map-close-btn:hover {
  background: #333333;
}

/* Toolbar */
.toolbar {
  position: absolute;
  top: 40px;
  right: 7px;
  z-index: 1000;
}

.toolbar button {
  background: rgba(5, 10, 16, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
  margin: 3px;
  padding: 8px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 18px;
}

#subBtns {
  display: flex;
  flex-direction: column;
  margin-top: 5px;
}

#subBtns.hidden {
  display: none !important;
}

#subBtns button:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.35);
  transform: scale(1.06);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

/* Feature Panel - Modern Glassmorphism Design */
#featurePanel {
  position: absolute;
  top: 8px;
  left: 8px;
  bottom: 8px;
  z-index: 1002;
  
  /* Glassmorphism Background */
  background: var(--gradient-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  /* Modern Styling */
  color: var(--text-primary);
  border: 1px solid var(--panel-border-color);
  border-radius: var(--panel-border-radius);
  padding: 0;
  box-sizing: border-box;
  
  /* Enhanced Shadows */
  box-shadow: var(--panel-shadow), var(--panel-shadow-inner), var(--panel-shadow-colored);
  
  /* Sizing — stay inside map area */
  width: min(300px, 34%);
  max-width: calc(100% - 16px);
  height: calc(100% - 16px);
  max-height: calc(100% - 16px);
  overflow: hidden;
  
  /* Animation */
  display: none;
  opacity: 0;
  transform: translateX(-20px) scale(0.95);
  transition: opacity var(--panel-transition-duration) var(--panel-transition-timing),
              transform var(--panel-transition-duration) var(--panel-transition-timing);
}

#featurePanel.active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 1;
  transform: translateX(0) scale(1);
  animation: slideInLeft var(--panel-transition-duration) var(--panel-transition-timing);
}

#featurePanel .feature-panel-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0;
}

/* Feature Panel Header - Enhanced */
#featurePanel .panel-header {
  position: sticky;
  top: 0;
  flex-shrink: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 50px;
  width: 100%;
  padding: 10px 8px;
  margin: 0;
  justify-content: space-between;
  align-items: center;
  
  /* Gradient Background */
  background: var(--gradient-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--panel-border-color);
  border-radius: var(--panel-border-radius) var(--panel-border-radius) 0 0;
}

#featurePanel .panel-header h3 {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.05rem;
  text-align: left;
  font-weight: 600;
  padding: 0 36px 0 0;
  line-height: 1.3;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

/* Feature Panel Close Button */
#featurePanel .closeBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(5, 10, 16, 0.8);
  border: 1px solid var(--panel-border-color);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  transition: all 200ms var(--panel-transition-timing);
}

#featurePanel .closeBtn:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

#featurePanel p {
  margin: 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  overflow-wrap: break-word;
}

#featurePanel .carousel {
  margin-top: 0;
  width: 100%;
  overflow: visible;
  height: auto;
}

#featurePanel .carousel-inner {
  background: rgba(5, 10, 16, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid var(--panel-border-color);
  border-radius: 0;
  border-left: none;
  border-right: none;
  padding: 8px;
  width: 100%;
  height: auto;
  overflow: visible;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#featurePanel .single-feature,
#featurePanel .feature-panel-body > .feature-empty-message {
  padding: 8px;
}

#featurePanel .carousel-item {
  color: var(--text-primary);
  font-size: 0.85rem;
  min-height: 0;
  max-height: none;
  width: 100%;
  overflow: visible;
  padding: 4px 0;
  animation: fadeIn 300ms var(--panel-transition-timing);
  float: none;
  display: none;
}

#featurePanel .carousel-item.active,
#featurePanel .carousel-item-next,
#featurePanel .carousel-item-prev {
  display: block;
}

#featurePanel .feature-panel-body > .carousel.slide {
  overflow: visible;
}

#featurePanel .carousel-item h4,
#featurePanel .single-feature h4 {
  margin: 0 0 10px 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  padding: 0 0 8px 0;
  border-bottom: 1px solid var(--panel-border-color);
}

#featurePanel .carousel-item p {
  margin: 3px 0;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

#featurePanel .carousel-controls {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0;
  height: auto;
  z-index: 4;
  width: auto;
  order: 3;
  flex: 1 1 100%;
  margin-top: 2px;
}

#featurePanel .carousel-control-prev,
#featurePanel .carousel-control-next,
#featurePanel .feature-nav-btn {
  position: static;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  background: rgba(5, 10, 16, 0.72);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

#featurePanel .carousel-control-prev:hover,
#featurePanel .carousel-control-next:hover,
#featurePanel .feature-nav-btn:hover {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.65);
  color: #67e8f9;
  opacity: 1;
  transform: translateY(-1px);
}

#featurePanel .carousel-control-prev:active,
#featurePanel .carousel-control-next:active,
#featurePanel .feature-nav-btn:active {
  transform: translateY(0) scale(0.96);
}

#featurePanel .carousel-control-prev:focus-visible,
#featurePanel .carousel-control-next:focus-visible,
#featurePanel .feature-nav-btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.7);
  outline-offset: 2px;
}

#featurePanel .feature-nav-btn i {
  font-size: 0.95rem;
  line-height: 1;
}

#featurePanel .feature-nav-count {
  min-width: 5.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #67e8f9;
}

/* Hide Bootstrap's default chevron SVGs if still present */
#featurePanel .carousel-control-prev-icon,
#featurePanel .carousel-control-next-icon {
  display: none;
}

#featurePanel p .key {
  padding-right: 0;
}


/* Property Rows - Card-based Design */
#featurePanel p.property-row {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  column-gap: 0.4rem;
  row-gap: 0.15rem;
  align-items: start;
  margin: 4px 0;
  padding: 6px 8px;
  white-space: normal;
  overflow: visible;
  background: rgba(5, 10, 16, 0.3);
  border: 1px solid var(--panel-border-color);
  border-radius: 6px;
  transition: all 200ms var(--panel-transition-timing);
}

#featurePanel p.property-row:hover {
  background: rgba(8, 15, 23, 0.5);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#featurePanel p.property-row .key {
  text-align: left;
  font-weight: 600;
  color: var(--panel-accent-color);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  min-width: 0;
}

#featurePanel p.property-row .value {
  text-align: left;
  word-break: break-word;
  white-space: normal;
  color: var(--text-secondary);
  font-size: 0.85rem;
}



/* Single Feature Panel - Enhanced */
#featurePanel .single-feature p.property-row {
  font-size: 0.85rem;
  padding: 6px 8px;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  column-gap: 0.4rem;
  background: rgba(5, 10, 16, 0.3);
  border: 1px solid var(--panel-border-color);
  border-radius: 6px;
  transition: all 200ms var(--panel-transition-timing);
}

#featurePanel .single-feature p.property-row:hover {
  background: rgba(8, 15, 23, 0.5);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateX(2px);
}

#featurePanel .single-feature p.property-row .key {
  font-weight: 600;
  text-align: left;
  color: var(--panel-accent-color);
}

#featurePanel .single-feature p.property-row .value {
  text-align: left;
  word-break: break-word;
  color: var(--text-secondary);
}

#featurePanel .single-feature h4 {
  padding-left: 0;
}

#featurePanel .single-feature {
  min-width: 0;
}

.map-area #featurePanel {
  pointer-events: auto;
}

/* ============================================
   Panel Animations
   ============================================ */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================
   Custom Scrollbar Styling
   ============================================ */
.panel::-webkit-scrollbar,
#featurePanel .feature-panel-body::-webkit-scrollbar {
  width: 8px;
}

.panel::-webkit-scrollbar-track,
#featurePanel .feature-panel-body::-webkit-scrollbar-track {
  background: rgba(5, 10, 16, 0.3);
  border-radius: 4px;
}

.panel::-webkit-scrollbar-thumb,
#featurePanel .feature-panel-body::-webkit-scrollbar-thumb {
  background: rgba(34, 211, 238, 0.5);
  border-radius: 4px;
  transition: background 200ms ease;
}

.panel::-webkit-scrollbar-thumb:hover,
#featurePanel .feature-panel-body::-webkit-scrollbar-thumb:hover {
  background: rgba(34, 211, 238, 0.7);
}

/* Firefox Scrollbar */
.panel,
#featurePanel .feature-panel-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 211, 238, 0.5) rgba(5, 10, 16, 0.3);
}

/* Add to existing styles.css */
.leaflet-container.cursor-loading,
.leaflet-container.cursor-loading * {
  cursor: wait !important; /* Standard loading cursor */
}








/* Panel - Modern Glassmorphism Design */
.panel {
  user-select: none;
  /* Height follows content; cap so it stays inside map-area above bottom boxes */
  top: 64px;
  right: 50px;
  bottom: auto;
  height: fit-content;
  max-height: calc(100% - 76px);
  overflow: auto;
  position: absolute;
  z-index: 1001;
  
  /* Glassmorphism Background */
  background: var(--gradient-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  
  /* Modern Styling */
  border: 1px solid var(--panel-border-color);
  border-radius: var(--panel-border-radius);
  padding: var(--panel-padding);
  width: 300px;
  
  /* Enhanced Shadows */
  box-shadow: var(--panel-shadow), var(--panel-shadow-inner), var(--panel-shadow-colored);
  
  /* Animation */
  display: none;
  opacity: 0;
  transform: translateX(20px) scale(0.95);
  transition: opacity var(--panel-transition-duration) var(--panel-transition-timing),
              transform var(--panel-transition-duration) var(--panel-transition-timing);
}

.panel.active {
  display: block;
  opacity: 1;
  transform: translateX(0) scale(1);
  animation: slideInRight var(--panel-transition-duration) var(--panel-transition-timing);
}

/* Panel Header - Enhanced Design */
.panel-header {
  display: flex;
  align-items: center;
  padding: var(--panel-header-padding);
  min-height: 40px;
  position: sticky;
  top: 0;
  z-index: 1002;
  margin-bottom: var(--panel-gap);
  
  /* Gradient Background */
  background: var(--gradient-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  /* Border */
  border-bottom: 1px solid var(--panel-border-color);
  border-radius: 8px 8px 0 0;
}

.panel-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

/* Close Button - Enhanced Design */
.closeBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(5, 10, 16, 0.8);
  border: 1px solid var(--panel-border-color);
  padding: 6px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-size: 16px;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms var(--panel-transition-timing);
  z-index: 1003;
}

.closeBtn:hover {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 0.5);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.closeBtn:active {
  transform: rotate(90deg) scale(0.95);
}

/* Panel Buttons - Modern Card-like Design */
.panelBtn {
  display: block;
  width: 100%;
  background: rgba(5, 10, 16, 0.6);
  color: var(--text-primary);
  border: 1px solid var(--panel-border-color);
  padding: var(--panel-button-padding);
  margin: 6px 0;
  cursor: pointer;
  border-radius: 8px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  transition: all 200ms var(--panel-transition-timing);
  position: relative;
  overflow: hidden;
}

.panelBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--gradient-primary);
  transition: width 200ms var(--panel-transition-timing);
  z-index: 0;
}

.panelBtn > * {
  position: relative;
  z-index: 1;
}

.panelBtn:hover {
  background: rgba(8, 15, 23, 0.8);
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateX(4px) scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.panelBtn:hover::before {
  width: 4px;
}

.panelBtn.active {
  background: rgba(34, 211, 238, 0.15);
  border-left: 4px solid var(--panel-accent-color);
  border-color: rgba(34, 211, 238, 0.5);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(34, 211, 238, 0.2);
}

.panelBtn.active::before {
  width: 4px;
  background: linear-gradient(180deg, var(--panel-accent-color), var(--panel-accent-hover));
}

.panelBtn:focus {
  outline: 2px solid var(--panel-accent-color);
  outline-offset: 2px;
}

#chartjs-tooltip {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  color: white;
  opacity: 1;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 0);
  transition: all 0.1s ease;
  padding: 5px 10px;
  font-size: 12px;
  font-family: Arial, sans-serif;
}

#chart-bottom2-0{
  height: 1000px !important;
}

#chartjs-tooltip table {
  border-collapse: collapse;
}

#chartjs-tooltip td {
  padding: 2px 5px;
}

#chartjs-tooltip span {
  display: block;
}

.chart-canvas {
  width: 100%;
  height: 100%;
  max-height: 40vh; /* Adjust for normal mode */

}

.chartjs-tooltip {
  background: rgba(0, 0, 0, 0.7);
  border-radius: 3px;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  font-family: Arial, sans-serif;
}

/* Logo Carousel */
.logo-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

.logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
  margin-bottom: 10px;
  min-height: 60px;
  width: 100%;
  height: calc(100% - 40px); /* Reserve space for carousel-controls */
  overflow: hidden;
}

.logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: none;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.logo-container p {
  margin: 0;
  font-size: 12px;
  color: #ffffff;
  text-align: center;
}

.logo-container .chart-canvas {
  max-width: 100%;
  max-height: 100%; /* Constrain graph height */
  width: 100%;
  height: auto;
  margin-top: 0px;
}

.carousel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 2px;
}

.category-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #ecfeff;
  text-align: center;
  margin: 0;
  padding: 0.4rem 0.65rem;
  background: var(--gradient-title);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 0.55rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 3px 0 #06b6d4;
}

.specific-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-primary);
  text-align: center;
  margin: 0;
  padding: 0.35rem 0.65rem;
}

.data-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0px;
  max-width: 90%;
  margin-bottom: 0px; /* Prevent overlap with carousel-controls */
}

.value-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0px;
  width: 100%;
}

.data-icon {
  color: var(--panel-accent-color);
  height: 40px;
  margin: 0px 0px;
}

img[src$=".svg"] {
  border: none;
}

.data-value {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text-primary);
  padding: 0px 5px;
  border-radius: 4px;
}

.data-value2 {
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text-success);
  padding: 0px 10px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 10px;
  height: 30px;
  position: relative;
  z-index: 10;
}

.carousel-btn {
  background: #000000;
  border: none;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
}

.carousel-btn:hover {
  background: #333333;
}

.carousel-text {
  font-size: 0.78rem;
  color: var(--text-kicker);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-align: center;
  flex-grow: 1;
}

/* Expand Button */
.expand-btn {
  position: absolute;
  top: -8px;
  right: -5px;
  background: #000000;
  border: none;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  font-size: 14px;
  color: #ffffff;
}

.expand-btn:hover {
  background: #333333;
}

.carousel-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Full-Screen Logo Container */
.fullscreen-logo-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;  
  height: 100vh;
  background: #000000;
  z-index: 2000;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

.fullscreen-logo-container.active {
  display: flex;
}

#fullscreenLogo .chart-canvas {
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.fullscreen-logo-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  z-index: 2;
  height: auto;
  padding: 5px;
  overflow: hidden;
  box-sizing: border-box;
}

.fullscreen-logo-content .logo-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 5px;
  box-sizing: border-box;
}

/* For chart containers, stretch to fill space */
.fullscreen-logo-content .logo-container:has(.fullscreen-chart-wrapper),
.fullscreen-logo-content .logo-container:has(canvas.chart-canvas) {
  justify-content: flex-start;
  align-items: stretch;
}

/* For image containers (right3), ensure they're centered */
.fullscreen-logo-content .logo-container > div[style*="flex-direction: column"] {
  width: 100%;
  height: 100%;
  flex: 1;
}

/* For chart containers, stretch to fill space */
.fullscreen-logo-content .logo-container:has(.fullscreen-chart-wrapper),
.fullscreen-logo-content .logo-container:has(canvas.chart-canvas) {
  justify-content: flex-start;
  align-items: stretch;
}

.fullscreen-logo-content .logo-container img {
  max-width: 60%; /* Increased from 45% */
  max-height: 80vh; /* Limit height to prevent overflow */
  object-fit: contain;
  border-radius: 4px;
  margin: auto; /* Center images */
}

.fullscreen-logo-content .carousel-content {
  gap: 20px; /* Increased gap for better spacing between title and value */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center content horizontally */
  justify-content: center; /* Center content vertically */
  flex: 1;
}

/* Ensure all children stack vertically */
.fullscreen-logo-content .carousel-content > * {
  width: auto;
  text-align: center;
  display: block;
}

.fullscreen-logo-content .category-title {
  font-size: 48px; /* Slightly reduced to save space */
  padding: 8px 15px;
  margin: 5px 0;
  text-align: center;
  width: 100%;
}

.fullscreen-logo-content .specific-title {
  font-size: 36px; /* Slightly reduced to save space */
  padding: 6px 15px;
  margin: 5px 0;
  text-align: center;
  width: 100%;
}

.fullscreen-logo-content .data-container {
  gap: 15px; /* Increased gap between value containers */
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 10px; /* Add space above values */
}

.fullscreen-logo-content .value-container {
  gap: 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap; /* Allow wrapping if needed */
  margin: 5px 0; /* Add vertical spacing */
}

.fullscreen-logo-content .data-icon {
  font-size: 34px;
  width: 180px !important; /* Slightly reduced */
  height: 150px !important; /* Slightly reduced */
}

.fullscreen-logo-content .data-value {
  font-size: 48px; /* Slightly reduced */
  padding: 8px 15px;
  text-align: center;
  display: block;
  width: 100%;
}

.fullscreen-logo-content .data-value2 {
  font-size: 36px; /* Slightly reduced */
  padding: 8px 15px;
  text-align: center;
  display: block;
  width: 100%;
}

.fullscreen-logo-content .chart-canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  z-index: 3;
  overflow: visible;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  flex: 1 1 auto !important;
}

/* Chart wrapper fills space above carousel buttons — never covers them */
.fullscreen-chart-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 100% !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 0 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative;
  z-index: 1;
}

.fullscreen-chart-wrapper .chart-canvas {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
  z-index: auto !important;
}

.fullscreen-logo-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 10px 8px 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  position: relative;
  z-index: 6;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.92) 35%);
}

.fullscreen-logo-btn {
  background: #000000;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.fullscreen-logo-btn:hover {
  background: #333333;
}

.fullscreen-logo-btn.active {
  background: #1a1a1a;
  border: 2px solid #2dd4bf;
}

.fullscreen-close-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #000000;
  border: none;
  padding: 5px;
  border-radius: 50%;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.5);
  cursor: pointer;
  font-size: 18px;
  color: #ffffff;
}

.fullscreen-close-btn:hover {
  background: #333333;
}

/* Fullscreen title box */
.fullscreen-logo-container .row,
.fullscreen-map-container .row {
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  width: 100%;
  height: auto;
  min-height: 3.25rem;
}

.fullscreen-logo-container .title-box,
.fullscreen-map-container .title-box,
.title-box--fullscreen {
  margin: 0 !important;
  padding: 0.55rem 3rem 0.55rem 0.85rem !important;
  height: auto !important;
  min-height: 3.25rem !important;
  max-height: none !important;
  flex-shrink: 0;
  justify-content: flex-start !important;
  align-items: center !important;
}

/* Make charts fill available space better */
#fullscreenLogoContainer {
  width: 100% !important;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
}

#fullscreenLogoContainer .chart-canvas {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 1 1 auto !important;
}

/* Custom box heights — flex-friendly so medium screens don’t overflow */
.bottom-center-box-height {
  height: 23.5vh;
  min-height: 0;
  overflow: hidden;
}

.right-middle-box-height {
  height: 41vh;
  min-height: 0;
  overflow: auto;
}

.right-box-height {
  height: 18vh;
  min-height: 0;
  overflow: hidden;
}

.left-box-height {
  height: 21vh;
  min-height: 0;
  overflow: hidden;
}

/* Utility: force certain side boxes to match bottom-center box height */
.box.match-bottom-height {
  height: 23.5vh !important;
  min-height: 0 !important;
  max-height: 23.5vh !important;
}

/* Ensure map fills the map-area */
.map-area #map {
  height: 100% !important;
}

/* Dashboard and box styles */
.box {
  border: 1px solid var(--panel-border-color) !important;
  box-shadow: var(--panel-shadow-inner), 0 10px 28px rgba(0, 0, 0, 0.28) !important;
  background: var(--gradient-bg) !important;
  border-radius: var(--panel-border-radius);
  min-width: 0;
}

.title-box {
  border: 1px solid rgba(34, 211, 238, 0.28) !important;
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(8, 145, 178, 0.14), transparent 42%),
    rgba(5, 10, 16, 0.94) !important;
  box-shadow: inset 3px 0 #06b6d4 !important;
  gap: 0.75rem;
}

.title-box__brand {
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
}

.title-box__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.title-box__kicker {
  display: block;
  color: var(--text-kicker);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.title-box__text {
  line-height: 1.25;
  font-size: clamp(0.82rem, 1.35vw, 1.05rem);
  font-weight: 650;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.title-box__suffix-toggle {
  flex: 0 0 auto;
}

.title-box__filter-chips {
  flex: 0 1 auto;
  display: none;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-height: 3.4rem;
  overflow-y: auto;
}

.title-box__filter-chips.is-active {
  display: flex;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #02070b;
  border-radius: 0.5rem;
  padding: 3px 3px 3px 10px;
}

.filter-chip__label {
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-chip__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

/* Amber: a place scope. Deliberately not the interface cyan — these are state
   indicators, not controls, and must read as "something is narrowing your view". */
.filter-chip--district {
  border: 1px solid rgba(251, 191, 36, 0.45);
}

.filter-chip--district .filter-chip__label {
  color: #fcd34d;
}

.filter-chip--district .filter-chip__clear {
  color: rgba(252, 211, 77, 0.75);
}

.filter-chip--district .filter-chip__clear:hover {
  background: rgba(251, 191, 36, 0.14);
  color: #fef3c7;
}

/* Cyan: a feature-type scope, so the two kinds are distinguishable at a glance. */
.filter-chip--feature {
  border: 1px solid rgba(34, 211, 238, 0.45);
}

.filter-chip--feature .filter-chip__label {
  color: #67e8f9;
}

.filter-chip--feature .filter-chip__clear {
  color: rgba(103, 232, 249, 0.75);
}

.filter-chip--feature .filter-chip__clear:hover {
  background: rgba(34, 211, 238, 0.14);
  color: #cffafe;
}

.table-suffix-toggle {
  display: inline-flex;
  gap: 4px;
  background: #02070b;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 0.5rem;
  padding: 3px;
}

.table-suffix-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.35rem 0.7rem;
  border-radius: 0.35rem;
  cursor: pointer;
  white-space: nowrap;
}

.table-suffix-btn:hover {
  background: rgba(34, 211, 238, 0.08);
}

.table-suffix-btn.active {
  background: linear-gradient(135deg, #0891b2, #0f766e);
  color: #ecfeff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.2);
}

.feature-suffix-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
  vertical-align: middle;
}

.feature-empty-message {
  margin: 12px 0 4px;
  padding: 0 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.title-box__brand img {
  height: clamp(2.75rem, 5.5vh, 3.75rem);
  width: auto;
  max-width: min(28vw, 9rem);
  object-fit: contain;
  flex-shrink: 0;
}

/* Right1 Box Styles — match .logo-container so carousel arrows stay visible */
.right1-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: calc(100% - 32px); /* Reserve space for carousel-controls */
  padding: 2px 4px 0;
  overflow: hidden;
}

.right1-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr 1fr; /* stretch cells to fill height */
  gap: 4px;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

/* Grants slide: two stacked KPIs (SME + Micro) */
.right1-content.right1-content--grants {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
  max-width: 100%;
  gap: 4px;
}

#right1 .title-value-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 4px;
  min-height: 0;
  height: 100%;
}

#right1 .category-title {
  font-size: 0.68rem;
  padding: 0.2rem 0.4rem;
  margin: 0;
  line-height: 1.15;
}

#right1 .data-value {
  font-size: 1rem;
  padding: 0;
  line-height: 1.2;
}

#right1 .carousel-controls {
  height: 28px;
  padding: 0 6px;
  flex-shrink: 0;
}

.title-value-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Chart font sizes for normal view (non-fullscreen carousels) */
.chart-canvas {
 
  --data-label-font-size: 12px; /* Change this to adjust default data label size for all charts */
 
  --x-axis-font-size: 10px; /* Change this to adjust default X-axis tick font size */
  
  --y-axis-font-size: 10px; /* Change this to adjust default Y-axis tick font size */
}

/* Chart-specific font sizes for normal view (keyed by chartKey, not slide index) */
#chart-left1-type-wise {
  
  --data-label-font-size: 0px; /* Change this to adjust data label size for this chart */
  /* Custom X-axis tick font size for this chart */
  --x-axis-font-size: 14px; /* Change this to adjust X-axis tick font size */
  /* Custom Y-axis tick font size for this chart */
  --y-axis-font-size: 11px; /* Change this to adjust Y-axis tick font size */
}

#chart-left1-sub-type-wise {
  
  --data-label-font-size: 0px; /* Change this to adjust data label size for this chart */
  /* Custom X-axis tick font size for this chart */
  --x-axis-font-size: 0px; /* Change this to adjust X-axis tick font size */
  /* Custom Y-axis tick font size for this chart */
  --y-axis-font-size: 11px; /* Change this to adjust Y-axis tick font size */
}

#chart-left1-category-wise {
  
  --data-label-font-size: 0px !important; 
  /* Custom X-axis tick font size for this chart */
  --x-axis-font-size: 14px; /* Change this to adjust X-axis tick font size */
  /* Custom Y-axis tick font size for this chart */
  --y-axis-font-size: 0px; /* Change this to adjust Y-axis tick font size */
}

#chart-bottom1-1 {
  /* Custom data label font size for chart with ID 'chart-bottom1-0' */
  --data-label-font-size: 0px; /* Change this to adjust data label size for this specific chart */
}
#chart-bottom1-2{
  --data-label-font-size: 0px;
   --x-axis-font-size: 7px;

}

#chart-bottom1-3{
  --data-label-font-size: 0px;
   --x-axis-font-size: 14px;
   --y-axis-font-size: 10px;

}
#chart-bottom1-4{
  --data-label-font-size: 0px;
   --x-axis-font-size: 14px;
   --y-axis-font-size: 14px;

}
#chart-bottom1-5{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 14px;

}
#chart-bottom1-6{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 14px;

}
#chart-bottom1-7{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 14px;

}
#chart-bottom1-8{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 14px;

}

#chart-bottom2-0{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 12px;

}
#chart-bottom2-1{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 12px;

}
#chart-bottom2-2{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 12px;

}

#chart-bottom2-3{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 12px;

}

#chart-bottom2-4{
  --data-label-font-size: 0px;
   --x-axis-font-size: 12px;
   --y-axis-font-size: 12px;

}
/* Chart font sizes for fullscreen view (when carousels are expanded) */
.chart-canvas[id^="fullscreen-chart-"] {
  --data-label-font-size-fullscreen: 24px; /* Increased from 18px for better visibility */
  --x-axis-font-size-fullscreen: 16px; /* Increased from 12px */
  --y-axis-font-size-fullscreen: 18px; /* Increased from 16px */
  --legend-font-size-fullscreen: 18px; /* Added for legend labels */
}

/* Chart-specific font sizes for fullscreen view - increased for better visibility */
#fullscreen-chart-bottom1-1 {
  --data-label-font-size-fullscreen: 20px; /* Increased from 12px */
  --x-axis-font-size-fullscreen: 16px;
  --y-axis-font-size-fullscreen: 18px;
}
#fullscreen-chart-bottom1-7 {
  --data-label-font-size-fullscreen: 18px; /* Increased from 10px */
  --x-axis-font-size-fullscreen: 16px;
  --y-axis-font-size-fullscreen: 18px;
}
#fullscreen-chart-left1-type-wise {
  --data-label-font-size-fullscreen: 20px; /* Increased from 12px */
  --x-axis-font-size-fullscreen: 16px; /* Increased from 14px */
  --y-axis-font-size-fullscreen: 18px;
}

#fullscreen-chart-left1-sub-type-wise {
  --data-label-font-size-fullscreen: 22px; /* Increased from 19px */
  --x-axis-font-size-fullscreen: 16px; /* Increased from 14px */
  --y-axis-font-size-fullscreen: 18px;
}
#fullscreen-chart-left1-category-wise {
  --data-label-font-size-fullscreen: 18px; /* Increased from 10px */
  --x-axis-font-size-fullscreen: 16px; /* Increased from 14px */
  --y-axis-font-size-fullscreen: 18px;
}

/* Doughnut/Pie charts in fullscreen - ensure labels are visible */
.chart-canvas[id^="fullscreen-chart-"] {
  --legend-font-size-fullscreen: 18px; /* Ensure legend is readable */
}
/* Styling for right2 box container (normal view) */
#logoContainerRight2 {
  border: none;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 2px !important;
  text-align: left !important;
}

/* Styling for logo-carousel in right2 (normal view) */
#logoContainerRight2 .logo-carousel {
  height: 100% !important;
  min-height: 100% !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* Styling for right2 box content (normal view) */
#logoContainerRight2 .carousel-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  height: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Styling for the single title in right2 (normal view) */
/* #logoContainerRight2 .carousel-content .specific-title {
  font-size: 16px;
  font-weight: bold;
  
  margin: 0 0 10px 0;
  text-align: center !important;
  color: #ffffff;
  flex: 0 0 auto !important;
  background-color: #8B4513;
} */

#logoContainerRight2 .carousel-content .specific-title {
  font-size: 16px;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: #ffffff;
  background-color: #8B4513;
  display: block; /* Ensure <h4> is a block element */
  width: 100%; /* Span full container width */
  text-align: center !important; /* Center text */
  flex: 0 0 auto; /* Retain flex behavior if needed */
}

/* Styling for the search input in right2 (normal view) */
#logoContainerRight2 .carousel-content .right2-search {
  width: 100%;
  padding: 1px;
  font-size: 14px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  flex: 0 0 auto !important;
}

/* Styling for the list container in right2 (normal view) */
#logoContainerRight2 .carousel-content .right2-list {
  list-style: none;
  padding: 0;
  flex: 1 1 auto !important;
  overflow-y: auto;
  width: 100%;
}

/* Styling for individual list items in right2 (normal view) */
#logoContainerRight2 .carousel-content .right2-item {
  border: 1px solid #ccc;
  padding: 5px;
  margin-bottom: 0px;
  cursor: pointer;
  /* color: red; */
  font-size: 13px; /* Fixed invalid font-size: 5, set to match search input */
  overflow-wrap: break-word; /* Wrap long village names */
  white-space: normal; /* Allow text wrapping */
}

/* Hover effect for list items in right2 (normal view) */
#logoContainerRight2 .carousel-content .right2-item:hover {
  background-color: #333;
}

#logoContainerRight2 .carousel-content .right2-item.selected {
  background: rgba(34, 211, 238, 0.22);
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: inset 3px 0 #06b6d4;
}

/* Styling for right2 box container (fullscreen view) */


/* Styling for the search input in right2 (fullscreen view) */
#fullscreenLogoContainer .carousel-content .right2-search {
  width: 100% !important;
  padding: 4px !important;
  font-size: 18px !important;
  margin-bottom: 15px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  flex: 0 0 auto !important;
}

/* Styling for the list container in right2 (fullscreen view) */
#fullscreenLogoContainer .carousel-content .right2-list {
  list-style: none !important;
  padding: 5px !important;
  flex: 1 1 auto !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  width: 100% !important;
}

/* Styling for individual list items in right2 (fullscreen view) */
#fullscreenLogoContainer .carousel-content .right2-item {
  background-color: #222 !important;
  padding: 8px !important;
  margin-bottom: 10px !important;
  font-size: 16px !important;
  cursor: pointer !important;
  /* color: #ffea00 !important; */
  overflow-wrap: break-word !important; /* Wrap long village names */
  white-space: normal !important; /* Allow text wrapping */
}

/* Hover effect for list items in right2 (fullscreen view) */
#fullscreenLogoContainer .carousel-content .right2-item:hover {
  background-color: #007bff !important;
}

#fullscreenLogoContainer .carousel-content .right2-item.selected {
  background: rgba(34, 211, 238, 0.28) !important;
  border-color: rgba(34, 211, 238, 0.75) !important;
  box-shadow: inset 3px 0 #06b6d4 !important;
}

/* Styling for parent container (normal and fullscreen view) */
.right-box, #rightBoxContainer {
  display: block !important;
  text-align: left !important;
  justify-content: normal !important;
  align-items: normal !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
}

/* ... Other box borders and chart font sizes unchanged ... */

/* ============================================
   Responsive Panel & Layout Adjustments
   ============================================ */
@media (max-width: 767px) {
  .title-box {
    min-height: 4rem;
    align-items: flex-start;
  }

  .title-box__brand img {
    height: clamp(2.25rem, 8vw, 3rem);
    max-width: min(38vw, 7.5rem);
  }

  .title-box__text {
    font-size: 0.85rem;
  }

  .left-box-height,
  .right-box-height,
  .right-middle-box-height,
  .bottom-center-box-height,
  .box.match-bottom-height {
    height: auto !important;
    min-height: 12rem !important;
    max-height: none !important;
  }

  .dashboard > .row.flex-grow-1 {
    height: auto !important;
    flex: 1 1 auto;
  }

  .dashboard > .row.flex-grow-1 > [class*="col-"] {
    height: auto !important;
  }

  /* Layer/Basemap Panel - Mobile */
  .panel {
    top: 56px;
    right: 10px;
    bottom: auto;
    height: fit-content;
    width: calc(100vw - 20px);
    max-width: 320px;
    max-height: calc(100% - 66px);
  }
  
  /* Feature Panel - Mobile */
  #featurePanel {
    top: 6px;
    left: 6px;
    bottom: 6px;
    width: min(300px, calc(100% - 12px));
    max-width: calc(100% - 12px);
    height: calc(100% - 12px);
    max-height: calc(100% - 12px);
  }
  
  /* Panel Buttons - Touch Friendly */
  .panelBtn {
    padding: 14px 16px;
    min-height: 44px;
    font-size: 15px;
  }
  
  /* Property Rows - Mobile */
  #featurePanel p.property-row {
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
    column-gap: 0.35rem;
    padding: 8px;
    font-size: 0.9rem;
  }
  
  #featurePanel .single-feature p.property-row {
    grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  }
}

/* Medium / small-desktop: 2-layout (map full width, sides below)
   Three-column restores at xl (1200px+). */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .dashboard {
    overflow-x: hidden;
    height: auto !important;
    min-height: 100dvh;
    overflow-y: auto;
  }

  .dashboard.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.75rem !important;
  }

  .dashboard-main-row {
    height: auto !important;
    flex: 0 0 auto !important;
  }

  .dashboard-col {
    height: auto !important;
    min-height: 0;
  }

  .dashboard-col--center {
    min-height: min(62vh, 640px);
  }

  .dashboard-col--center .map-area {
    min-height: min(48vh, 520px);
  }

  .title-box {
    min-height: 3.75rem;
    padding: 0.45rem 0.7rem;
  }

  .title-box__text {
    font-size: clamp(0.72rem, 1.2vw, 0.92rem);
  }

  .title-box__kicker {
    font-size: 0.55rem;
  }

  .title-box__brand img {
    height: clamp(2.1rem, 4.5vh, 2.85rem);
  }

  /* Bottom graphs get real width under a full-width map */
  .bottom-center-box-height {
    height: 28vh !important;
    min-height: 220px !important;
    max-height: 320px !important;
  }

  .box.match-bottom-height {
    height: 22vh !important;
    min-height: 180px !important;
    max-height: 260px !important;
  }

  .left-box-height {
    height: 22vh;
    min-height: 170px;
  }

  .right-box-height {
    height: 18vh;
    min-height: 140px;
  }

  .right-middle-box-height {
    height: 36vh;
    min-height: 260px;
  }

  .category-title {
    font-size: 0.72rem;
    padding: 0.35rem 0.5rem;
  }

  .specific-title {
    font-size: 0.82rem;
    padding: 0.3rem 0.5rem !important;
  }

  .data-value {
    font-size: 0.95rem;
  }

  .data-value2 {
    font-size: 0.85rem;
  }

  .data-icon {
    height: 32px;
  }

  .carousel-text {
    font-size: 0.72rem;
  }

  .logo-carousel,
  .logo-container {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .box:hover {
    transform: none;
  }

  .panel {
    right: 12px;
    width: min(300px, 34vw);
    top: 56px;
    bottom: auto;
    height: fit-content;
    max-height: calc(100% - 66px);
  }

  #featurePanel {
    left: 8px;
    width: min(320px, 38%);
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .bottom-center-box-height {
    height: 26vh !important;
    min-height: 200px !important;
  }

  .right1-content .title-value-pair,
  .title-value-pair {
    padding: 0.35rem;
  }
}

@media (min-width: 1920px) {
  /* Large Desktop - Slightly Larger Panels */
  .panel {
    width: 350px;
  }
  
  #featurePanel {
    width: min(320px, 36%);
  }
}
