html {
    font-size: calc(10px + (16 - 12) * ((100vw - 440px) / 800));
}

*{
    margin:0;
    padding:0;
    box-sizing: border-box;
}

#map {
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

#title{
    margin: 10px 20px;
}

#control-panel{
    position: absolute;
    z-index: 100;
    right: 0;
    /* top: 1.2rem;
    left: 1.2rem; */
    padding: 1.6rem 1.2rem;
    padding-bottom: 1.2rem;
    /* border-radius: 0 0 0.6rem 0; */
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.2);
}
#control-panel:hover{
    background-color: rgba(255, 255, 255, 1);
}
#control-panel h3{
    font-size: 1.3rem;
    margin-right: 2.7rem;
    white-space: nowrap;
}
#control-panel ul{
    margin-top: 0.6rem;
    list-style-type: none;
    width: 100%;
}
#control-panel ul li{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.6rem;
    border-radius: 0.2rem;
}
#control-panel ul li:hover{
    background-color: rgba(0, 0, 0, 0.1);
}
#control-panel ul li input{
    position:absolute;
    top: 0;
    left:0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1;
}
.check{
    height: 1rem;
    aspect-ratio: 1;
    border-radius: 0.1rem;
    border: 1px solid #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.1rem;
}
.inside{
    height: 100%;
    width: 100%;
    border-radius: 0.1rem;
    background-color: #000;
    display: none;
}
#control-panel ul li input:checked + label + .check .inside {
    display: block;
}

.borough{
    fill: #fff;
    fill-opacity: 0;
}
.borough:hover{
    fill-opacity: 0.5;
}
.borough.focused:hover{
    fill-opacity: 0;
}
.borough.focused{
    fill: none;
    pointer-events: none;
}

.borough.inactive{
    fill: #ccc;
    fill-opacity: 0.5;
    pointer-events: none;
}

#sorting-controls {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 25px;
  }
  
  #sorting-controls label {
    font-size: 14px;
    font-weight: bold;
    color: #333;
  }
  
  #sortOrder {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
  }
  
  #sortOrder:focus {
    border-color: #69b3a2; 
    box-shadow: 0 0 5px rgba(105, 179, 162, 0.5);
    outline: none;
  }
  
  #sortOrder:hover {
    cursor: pointer;
    background-color: #f1f1f1;
  }
  
  #legend-container {
    position: absolute;
    top: 40px;
    left: 20px;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10; 
    font-family: Arial, sans-serif;
    font-size: 12px;
  }
  
  #legend-container h4 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
  }
  
  #legend-container div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
  }
  
  .legend-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 5px;
  }
  
  .legend-dot.blue {
    background: #6495ED;
  }
  
  .legend-dot.light-red {
    background: rgba(220, 20, 60, 0.3);
  }
  
  .legend-dot.dark-red {
    background: rgba(220, 20, 60, 0.7);
  }

  .legend-dot.green {
    background: rgba(113, 164, 151, 1);
  }
  
  #pie-chart-container {
    font-family: Arial, sans-serif;
    left:20px;
    top: 200px;
    position: absolute;
    margin: 0 auto;
    padding: 10px;
    background: white;
    width: 80%;
    width: fit-content;
    z-index: 20;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  #pie-chart-title {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
  }
  
  #pie-chart svg {
    display: block;
    margin: 0 auto;
  }
  
  #title {
    text-align: center;
    margin-top: 20px;
    position: relative;
  }
  
  .hover-container {
    position: relative;
    display: inline-block;
  }
  
  #toggle-button {
    font-weight: bold;
    font-size: 12px;
    color: gray;
    text-decoration: underline;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 0px;
    padding: 5px;
    background-color: white;
  }
  
  #toggle-button:hover {
    text-decoration: none;
  }
  
  .toggle-checkbox {
    display: none;
  }
  
  .toggle-checkbox:checked ~ .widget {
    display: flex;
  }
  
  .widget {
    display: none;
    flex-direction: column;
    gap: 10px;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 30px;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 500px;
    height: 500px;
    overflow-y: auto;
    transition: opacity 0.3s ease;
  }
  
  .close-button {
    align-self: flex-end;
    border: none;
    background: none;
    font-size: 14px;
    cursor: pointer;
    color: gray;
    text-decoration: underline;
  }
  
  .close-button:hover {
    color: black;
  }
  
  
  
  #processbookBtn{
    /* z-index: 200; */
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: small;
    color: black;
  }