:root{
    font-size: 16px;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
}
.title{
    display: flex; 
    align-items: baseline; 
    margin-top: 0.3rem;
    white-space: nowrap;
    /* font-size: clamp(8px, 0.9vw, 2rem); */
    font-size: clamp(8px, 1.0vw, 2rem);
    font-weight: 400; 
    color: darkblue;
}
.title-geodash{
    /* font-size: clamp(8px, 1.1vw, 2rem); */
    font-weight: bold;
}

.sidebar {
    width: 14.5vw;
    background-color: #f4f4f4;
    padding: 1.2rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.neighbourhood-list {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    width: 15vw;
    margin-left: -3.5rem;
}

.neighbourhood-list li {
    border: 0pt transparent white;
    display: inline-flex;
    align-items: center;
    border-bottom: 1pt solid rgb(201, 201, 201);
    border-left: 1pt solid rgb(201, 201, 201);
    background-color: #ffffff;
    color: #333;
    padding: 0.5rem 0;
    padding-left: 1rem;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s, color 0.2s;
    padding-left: 2rem;
    font-size: 0.95rem;
}

.neighbourhood-list li:hover {
    background-color: #eeeeee;
}

.neighbourhood-list li.active{
    padding-left: 0.9rem;
}

.neighbourhood-list li.active::before{
    content: "";
    display: block;
    width: 0.6rem;
    height: 0.6rem;
    background-color: #2c7dfa;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.view-selector {
    display: inline-flex;
    gap: 0.3rem;
    margin-bottom: 5px;
}

.view-selector button, .date-filter button {
    white-space: nowrap;
    background: none;
    background-color: gainsboro;
    border: 2px solid #ccc;
    padding: 0.5rem 1rem;
    position: relative;
    cursor: pointer;
    color: black;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.date-filter button{
    margin-right: 0.3rem;
    font-size: 0.6rem;
    padding: 0.3rem 0.5rem;
}

.view-selector button:hover, .date-filter button:hover {
    border-color: #999;
}

.view-selector button.active {
    border-top: 0.3rem solid #2c7dfa;
}

.date-filter button.active{
    border-top: 0.3rem solid orange;
}


#xRange {
    width: 80vw;
}

.main-content {
    margin-left: 16vw;
    padding: 20px;
    flex-grow: 1;
    margin-top: -0.7%;
}

.cards-container {
    display: grid;
    height: 90vh;
     grid-template-columns: repeat(4,1fr);
     grid-template-rows: repeat(3,1fr);
    gap: 0px;
    align-items: stretch;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    outline: 2pt solid #8a8a8a; 
    margin-top: 1px;
    margin-left: 1px;
    padding: 0.5rem;
}


.card h3 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.0rem;
    color: #2256aa;
}

div[data-crime-type="Break and Enter Residential/Other"] h3 {
    font-size: 0.9rem;
}

.card-note{
    font-size: 0.7rem;
    margin-top: 0;
    margin-bottom: 0;
    font-style: italic;
    color: #555;
}

.card-content, .card-content-col{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-content-col{
    flex-direction: column;
}

.current-count {
    font-weight: bold;
    font-size: 1.3rem;
}

.comparison {
    display: flex; 
    justify-content: center;
    gap: 0.3rem;
    border-top: 1pt solid #ccc;
    padding-top: 0.1rem;
    border: 1pt solid #ccc;
}

.triangle {
    margin-top: 0.2rem;
    width: 0;
    height: 0;
    border-left: 0.4rem solid transparent;
    border-right: 0.4rem solid transparent;
}

.triangle-up {
    border-bottom: .7rem solid red;
}

.triangle-down {
    border-top: .7rem solid green;
}

.triangle-nochange {
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.percent-change {
    font-weight: bold;
}

.percent-change.red, .previous-count.red {
    color: red;
}

.percent-change.green, .previous-count.green {
    color: green;
}

.previous-count {
    font-weight: bold;
    color: #555;
}

.same-count-msg{
    width: 100%;
    height: 80%;
    padding-top: 15%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    font-size: 0.8rem;
    display: none;
}

.spinner {
    display: none; 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 8px solid #f3f3f3; 
    border-top: 8px solid #3498db; 
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.chart-container {
    display: none;
}

.gauge {
    width: 8rem;
    height: 4rem;
    position: relative;
    border-top-left-radius: 10rem;  
    border-top-right-radius: 10rem; 
    border: 0.7rem solid rgb(137, 157, 163);
    border-left-color: green;
    border-right-color: red;
    border-bottom: 0;
}

.gauge.no-count{
    display: none;
}

.gauge .gauge-arrow {
    width: 0;
    height: 0;
    border-left: 0.3rem solid transparent;
    border-right: 0.3rem  solid transparent;
    border-bottom-left-radius: 100%;
    border-bottom-right-radius: 100%;
    border-bottom: 4.5rem  solid black;
    position: absolute;
    top: -1.0rem; 
    left: 50%; 
}

.gauge-tick-one{
    font-size: 0.8rem;
    position: absolute;
    color: green;
    top: 80%; 
    left: -32%;
}

.gauge-tick-two{
    font-size: 0.8rem;
    position: absolute;
    top: 10%; 
    left: -21%;
}

.gauge-tick-three{
    font-size: 0.8rem;
    position: absolute;
    top: -35%; 
    left: 15%; 
}  

.gauge-tick-four{
    font-size: 0.8rem;
    position: absolute;
    top: -35%; 
    left: 70%; 
}

.gauge-tick-five{
    font-size: 0.8rem;
    position: absolute;
    top: 10%;
    left: 103%; 
}

.gauge-tick-six{
    color: red;
    font-size: 0.8rem;
    position: absolute;
    top: 80%; 
    left: 114%;
}
  
.slider-container {
    margin-left: 2rem;
    position: relative;
    width: 78vw;
    top: -2.5rem;
  }

input[type="range"] {
    appearance: none;
    position: absolute;
    width: 100%;
    pointer-events: none;
    height: 0;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    top:1.7rem;
    left: 0em;
    appearance: none;
    pointer-events: all;
    height: 1.3rem;
    width: 1.3rem;
    border-radius: 50%;
    background-color: #999;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.slider-track {
    position: absolute;
    height: 0.4rem;
    margin-left: 2px;
    top:1.7em;
    left: 0%;
    width: 100%;
    /* left: 1em; */
    background-color: #dddddd;
    z-index: -1;
    border-radius: 5px;
}
  
.custom-filter-container{
    font-size: 0.9rem;
    display: none;
}

#filterBtn::before{
    content: "";
    top: -4px;
    left: -1px;
    width: 0%;
    height: 0px;
    background-color: #d7dadf;
}
.date-filter{
    margin-left: 0.5rem;
    margin-top: 0.2rem;
    margin-right: 0.5rem;
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 5px;
}

#clear-charts{
    border: 2px solid black;
    color: black;
    background-color: red;
    font-weight: bolder;
    padding: 0.3rem 0.8rem;
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type = 'date']{
    border: 2px solid #ccc;
    position: relative;
    cursor: pointer;
    color: black;
    font-size: 0.8rem;
    transition: border-color 0.2s;
}

label{
    padding-top: 0.3rem;
}

.date-filter-buttons {
    display: flex;
    gap: 0.1rem;
}

/* width */
::-webkit-scrollbar {
    width: 0.0em;

}
.sidebar::-webkit-scrollbar {
    width: 0.55em;

}
  ::-webkit-scrollbar-button {
    width: 0.5em;
    color: red;
  }
  
::-webkit-scrollbar-thumb {
    background: #adadad; 
  }

.chart-wrapper-top{
    position: relative; 
    height: 42vh; 
    width: 75vw; 
    /* border: 0.01pt solid rgb(206, 206, 206); */
}

.piechart{
    width: 60vw; 
    height: 40vh; 
}
.barchart{
    position: relative;
    height: 40vh;
    width: 82vw;
}

.chart-wrapper-bottom{
    position: relative; 
    height: 84vh; 
    width: 80vw; 
}

div[data-tooltip]{
    z-index: 10;
    position: absolute;
    top:0%; 
    left: 0.1%;
}

[data-tooltip]:hover::before {
    position: absolute;
    left:1rem;
    content: attr(data-tooltip);
    border: 1px solid black;
    background-color: #eee;
    padding: .25rem;
    width: 300px;
}

#chart-comparison, #chart-trend {
    display: none;
}
#pie-title{
    width: 100%;
    font-size: 1.1rem;
    text-align: left;
    margin-left: 1.5rem;
    margin-top: 0.2rem;
    font-weight: bold;
    margin-bottom: 0.7rem;
}
#bar-title{
    width: 100%;
    font-size: 1.1rem;
    text-align: left;
    margin-left: 1.5rem;
    margin-top: 0.2rem;
    font-weight: bold;
    margin-bottom: 0.2rem;
}
#line-title{
    width: 100%;
    font-size: 1.2rem;
    text-align: center;
    margin-left: 1.5rem;
    margin-top: 0.2rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}
/* @media queries for smaller screen sizes */
@media (max-width: 1820px) {
    .view-selector button {
        padding: 0.3rem 0.8rem;
    }
}
@media (max-width: 1760px) {
    .banner{
        width: 240px
    }
}

@media (max-width: 1700px) {
    :root{
        font-size: 15px;
    }
}

@media (min-width: 1480px) {
    .gauge{
        width: 10rem;
        height: 6rem;
    }
    .gauge .gauge-arrow {
        width: 0;
        height: 0;
        border-left: 0.3rem solid transparent;
        border-right: 0.3rem  solid transparent;
        border-bottom: 5.8rem  solid black;
        position: absolute;
        top: -1.0rem; 
        left: 50%; 
    }
    .card-note{
        margin-bottom: 2rem;
    }
}
@media (max-width: 1599px) {
    .banner{
        width: 200px
    }
}

@media (max-width: 1500px) {
    :root{
        font-size: 15px;
    }
    .slider-container {
        width: 77vw;
      }
}

@media (max-width: 1300px) {
    .view-selector button, #clear-charts {
        padding: 0.3rem 0.8rem;
    }
    .banner{
        width: 180px;
        height:25px;
    }
}

@media (max-width: 1290px) {
    .view-selector button, #clear-charts{
        padding: 0.2rem 0.7rem;
    }
    .banner{
        width: 160px;
        height:20px;
    }
}

@media (max-width: 1250px) {
    :root{
        font-size: 13.8px;
    }
}
@media (max-width: 1200px) {
    :root{
        font-size: 12.5px;
    }
}

@media (max-width: 1120px) {
    .view-selector button, .date-filter button, #clear-charts {
        padding: 0.1rem 0.5rem;
    }
    :root{
        font-size: 12px;
    }
}

