body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #222;
    color: white;
    margin: 10px;
    padding-top: 40px; /* Space for header */
	font-color:White;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    padding: 15px;
    border-bottom: 1px solid #444;
    z-index: 1000;
}

.app-header h1 {
    margin: 0;
    font-size: 24px;
    color: white;
}

.control-label {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0 10px;
    width: 600px;
}

#main-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
}

#left-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
}
	
#right-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 100%;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    width: 100%;
}

.button-group button {
    padding: 10px 15px;
    font-size: 8px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
    background-color: #444;
	color: white;          /* Text color white */
}

.button-group button.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 1px #fff;
}

#reset-button {
    background-color: #ff9f1c;
    max-width: 100px;
    padding: 10px 10px;
    font-size: 9px;
    border-radius: 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	color: white;
}

#reset-button button.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 1px #fff;
}

.chart-note {
    font-size: 10px;
    font-weight: bold;
    margin: 10px 0 10px;
    width: 500px;
    text-align: left;
}

#map-container {
  flex: 0 0 auto;
  width: 700px;  /* reduce width to fit beside right containers */
  height: 700px; /* full viewport height minus header */
  background: #333;
  border-radius: 15px; /* Rounded corners like chart-container */
  position: sticky;
  box-sizing: border-box;
  touch-action: pan-y; /* Allow vertical scroll */
  overflow: visible;   /* ensure no clipping */
}

#chart-container {
  width: 600px;
  height: 600px; /* Adjust height as per header + padding */
  background: #333;
  border-radius: 15px;
  padding: 15px;
  box-sizing: border-box; 
  justify-content: flex-start;
  margin-left:30px;
  margin-right:50px;
  margin-top:30px;
  margin-bottom:50px;
}

path { background: #333; stroke: white ; stroke-width: 0.5px;   }

text {
      font-size: 10px;
      text-anchor: middle;
      paint-order: stroke;
      stroke: #222 ;
      stroke-width: 2;
      stroke-linejoin: round;
      fill: white;
	  cursor: pointer;
    }

.state.selectedRegion {
  stroke-width: 2.05;
}

.state.selected {
  stroke-width: 2.05;
}

.state-label {
  fill: #DCDCDC;
  font-size: 10px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #222;
  stroke-width: 2;
  stroke-linejoin: round;
  cursor: pointer;
}

.state-label.hovered {
  fill: #A3D2CA ;
  font-size: 11px;
}

.state-label.selected {
  fill: #A3D2CA  ;
  font-size: 11px;
  text-shadow: 0 0 1px #A3D2CA;
}

.axis text {
    fill: white;
}

.tooltip {
    position: absolute;
    display: none;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    pointer-events: none;
    transition: opacity 0.3s;
}

#chart circle {
    stroke: white;
    stroke-width: 2px;
    transition: stroke-width 0.2s;
}

#chart circle:hover {
    stroke-width: 3px;
}

@media (max-width: 375px) {
    body {
	margin: 0 auto;
	}  
	.app-header {
		padding:10px;
	}
    .app-header h1 {
        font-size: 12px;
    }
	
	svg {
		touch-action: manipulation; /* disables pinch-zoom but allows scroll */
	}
	
	.button-group button {
        padding: 6px 8px;
        font-size: 6px;
        border-radius: 4px;
        min-width: 50px;
    }
	
	#reset-button {
		padding: 7px;
		font-size: 6px;
		border-radius: 4px;
		max-width: 50px;
	}
	
	.control-label {
		font-size: 10px;
		margin: 5px 0 5px;
		width: 300px;
	}
	
	.state-label {
	  font-size: 6px;
	}
	
	.state-label.selected {
	  font-size: 7px;
	}
	
	.tooltip {
		font-size: 8px;
		padding: 8px;
		border-radius: 4px;
	}
	
	.footer {
	  font-size: 8px;
	  width:350px;
	}

    #main-container {
        flex-direction: column;
        align-items: center;
		gap: 5px;
    }
	
	#left-container {
		gap: 5px;
    }
	
	#right-container {
		gap: 5px;
    }

    #map-container {
        flex-shrink: 0;
        width: 350px;
		height:350px;
    }

    #chart-container {
        width: 300px;
        height: 350px;
		margin-left:35px;
	    margin-right:50px;
	    margin-top:10px;
	    margin-bottom:50px;
    }
	.chart-note {
		font-size: 8px;
		margin: 5px 0 5px;
		width: 300px;
	}
}

@media (min-width: 375px) and (max-width: 768px) {
    body {
	margin: 0 auto;
	}  
	.app-header {
		padding:10px;
	}
    .app-header h1 {
        font-size: 14px;
    }
	
	.button-group button {
        padding: 8px 10px;
        font-size: 6px;
        border-radius: 4px;
        min-width: 60px;
    }
	
	#reset-button {
		padding: 8px;
		font-size: 6px;
		border-radius: 4px;
		max-width: 60px;
	}
	
	.control-label {
		font-size: 12px;
		margin: 5px 0 5px;
		width: 350px;
	}
	
	.state-label {
	  font-size: 6px;
	}
	
	.state-label.selected {
	  font-size: 7px;
	}
	
	.tooltip {
		font-size: 8px;
		padding: 8px;
		border-radius: 4px;
	}
	
	.footer {
	  font-size: 8px;
	  footer:350px;
	}

    #main-container {
        flex-direction: column;
        align-items: center;
		gap: 10px;
    }
	
	#left-container {
		gap: 10px;
    }
	
	#right-container {
		gap: 10px;
    }

    #map-container {
        flex-shrink: 0;
        width: 350px;
		height:350px;
    }

    #chart-container {
        width: 350px;
        height: 400px;
		margin-left:35px;
	    margin-right:50px;
	    margin-top:10px;
	    margin-bottom:50px;
    }
	
	.chart-note {
		font-size: 8px;
		margin: 5px 0 5px;
		width: 350px;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
    body {
	margin: 0 auto;
	}  
	.app-header {
		padding:10px;
	}
	 .app-header h1 {
        font-size: 16px;
    }
	
	#main-container {
        flex-direction: column;
        align-items: center;
		gap: 5px;
    }
	
	#left-container {
		gap: 5px;
    }
	
	#right-container {
		gap: 5px;
    }
	
	.control-label {
		font-size: 14px;
		margin: 5px 0 5px;
		width: 600px;
	}

    #map-container {
        flex-shrink: 0;
        width: 650px;
		height:650px;
    }
	
	.state-label {
	  font-size: 8px;
	}
	
	.state-label.selected {
	  font-size: 9px;
	}
	
	.tooltip {
		font-size: 8px;
		padding: 8px;
		border-radius: 4px;
	}
	
	.footer {
	  font-size: 8px;
	  width: 500px;	  
	}

    #chart-container {
        width: 500px;
		height:500px;
		margin-left:35px;
	    margin-right:50px;
	    margin-top:10px;
	    margin-bottom:50px;
    }
	
	.chart-note {
		font-size: 9px;
		margin: 8px 0 8px;
		width: 500px;
	}

    .button-group button {
        padding: 9px 11px;
        font-size: 8px;
        border-radius: 6px;
        min-width: 60px;
    }
	
	#reset-button {
		padding: 9px;
		font-size: 8px;
		max-width: 60px;
	}
}

@media (min-width: 1025px) {
    #map-container {        
		width: 700px;
        height: 700px;
    }

    #chart-container {
        width: 500px;
        height: 500px;		
		margin-left:35px;
	    margin-right:50px;
	    margin-top:20px;
	    margin-bottom:50px;
    }
	
	.chart-note {
		font-size: 10px;
		margin: 8px 0 8px;
		width: 500px;
	}

    .button-group button {
        padding: 10px 10px;
        font-size: 9px;
        min-width: 60px;
		border-radius: 6px;
    }
	
	#reset-button {
		padding: 10px 10px;
		font-size: 9px;
		border-radius: 6px;
		max-width: 60px;
	}
	
	.control-label {
		width: 600px;
		font-size: 16px;
	}
	
	.state-label {
	  font-size: 9px;
	}
	
	.state-label.selected {
	  font-size: 10px;
	}
}

