
/* data zone (hidden initially） */
#dataContainer {
	padding: 10px;
	background-color: #f9f9f9;
	border-top: 1px solid #ddd;
	display: none;
}

canvas {
	max-width: 100%;
	height: 300px;
	margin-bottom: 20px;
}

/* used for the chart */
.chart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    width: 80vw;
    z-index: 2000;
}

.chart-header {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.chart-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.chart-body {
    width: 100%;
    max-height: 60vh; 
    overflow: auto;
    padding-bottom: 40px;  /* avoid overlap between x-ticks and slider */
}

/* chart body */
.chart-body canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* chart slider */
.chart-slider-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
}

#chartContainer {
    position: relative;
    width: 80%;
    margin: auto;
}


/* slider */
.range-slider-container {
    width: 100%;
    text-align: center;
    margin-top: 5px auto;
    padding: 0;
}

.range-slider-container #range-slider {
    width: 80%;
    margin: auto;
}

#range-slider {
    margin-top: 15px;
    width: 80%;
    
    height: 30px;
}

#range-slider .noUi-connect {
    background-color: rgba(30, 30, 30, 0.5);
}


.noUi-handle {
    background: #007bff !important;
    border: 1px solid white;
    width: 1px;
    height: 20px;
    border-radius: 0;
    box-shadow: 0 0 px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.noUi-connect {
    background: #d3d3d3;
}

.noUi-base {
    background: #f0f0f0;
}

.noUi-tooltip {
    
    font-size: 12px;
    background: #007bff;
    color: white;
    padding: 2px 5px;
    border-radius: 0px;
}


#slider-values {
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
}

/* for the date control on the top of the page */
.legend-date-control {
  margin-top: 10px;
  font-size: 13px;
  padding: 8px 0;
}

.date-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.date-group {
  display: flex;
  gap: 4px;
}

.date-group button,
#legend-date-picker {
  font-size: 13px;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.date-group button:hover {
  background-color: #eee;
}

#legend-date-picker {
  min-width: 120px;
}

.pinpoint-marker.mesonet.triangle {
    width: 0px;
    height: 0px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid rgb(0, 0, 0);
    transform: translate(-6px, -6px);
}

.pinpoint-marker.mesonet.square {
    width: 10px;
    height: 10px;
    background-color: white;
    border: 1px solid black;
    box-sizing: border-box;
    border-radius: 0 !important;
}

/* adjust chart size when when windows becomes smaller */
@media (max-width: 768px) {
    .chart-popup {
        width: 80vw; /* make it 80% wide */
        max-width: 600px;
    }
}

