body {
    position: relative;
    font-size:20px;
    font-family: 'Open Sans';
    text-align: center;
    color: #1f1f1f;
    max-width: 2500px;
}

.chart-container {
    text-align: left;
}

.vis-container {
    position: relative;
    padding-top: 1rem;
}

.vis-container::before {
    content: "";
    background: #969696;
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 50%;
    right: 0;
    margin-left: 25%;
  }

.tickers-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.controls-container {
    padding: 0 0.5rem;
    margin: auto auto 2rem;
    font-size: 1.125rem;
}

.controls-container--dropdown {
    max-width: 450px;
}

.dashboard-intro {
    margin: 1rem auto;
}

/* dropdown styling */
.controls-container select {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAvklEQVR4nO3RwQqDMBCE4aGHYt92j75XD7ZPZxEUSsCmarKZ1flhbznMRwCllFJKKeXZDSfYeAfwBNCDNwPwAvDIIcb5elLEON97DZNC2DCWbJsg3dpjVoxtQbBibA+CDWNHECwYK4FojbGSiFYYq4HwxlhNhBfGBVEb44qohWmCKI1piiiFoUAcxVAh9mIoEVsx1Ih/MSEQOUwoxNI0cEiGf98QAfHrZ8L8RA4TEpFiQiOWujMglFJKKaWu3AfcdLEudXvTswAAAABJRU5ErkJggg==) no-repeat 99% 80%;
    background-size: 1rem;
    -moz-appearance: none; 
    -webkit-appearance: none; 
    appearance: none;

    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border: none;
    border-bottom: 1px solid #969696;
    border-radius: 0;
    height: 2.5rem;
    font-size: 1.35rem;
    padding: 0 0.25rem;
    width: 100%;
}

/* filter button styling */
.button-group {
    position: relative;
    border: none;
}

.buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
}

.filter-button {
    border: solid 1px #1f1f1f;
    position: relative;
    display: block;
    padding: 1rem;
    margin: 0.25rem;
    cursor: pointer;
    flex: calc(50% - 0.5rem);
}

.filter-button input {
    width: 100%;
    height: 100%;
    z-index: 1;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.filter-button label {
    z-index: -1;
}

/* filter button hover ane selected styles */

.filter-button:hover {
    background-color: rgba(191, 83, 44, 0.5);
}

.filter-button:has(input:checked) {
    background-color: #BF532C;
    border: solid 1px #111;
    color: white;
}

.filter-button:hover>label,
.filter-button:has(input:checked)>label {
    font-weight: bold;
}

/* Media queries for different screen sizes */

@media only screen and (min-width: 450px) {
    .filter-button {
        flex: 10%;
    }

    /* 5 filter buttons */
    .buttons-wrapper div:first-child:nth-last-child(5),
    .buttons-wrapper div:first-child:nth-last-child(5) ~ .filter-button {
        flex: 1 1 24%;
    }

    /* 6 filter buttons */
    .buttons-wrapper div:first-child:nth-last-child(6),
    .buttons-wrapper div:first-child:nth-last-child(6) ~ .filter-button {
        flex: 1 1 20%;
    }
}

@media only screen and (min-width: 600px) {
    .flourish-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        flex-direction: column;
        max-width: 650px;
        margin: auto;
    }

    .chart-summary {
        max-width: 600px;
        padding: 0 0.5rem;
        margin-bottom: 0.5rem;
    }

    .chart-container {
        margin-bottom: 1.5rem;
    }

    /* 4 filter buttons */
    .buttons-wrapper div:first-child:nth-last-child(4),
    .buttons-wrapper div:first-child:nth-last-child(4) ~ .filter-button {
        flex: 1 1 0px;
    }
    
    .ticker-container {
        flex: 1 1 0;
    }

    /* 4 tickers */
    .ticker-container:first-child:nth-last-child(4),
    .ticker-container:first-child:nth-last-child(4)~.ticker-container {
        flex: 50%;
    }

    /* 3 tickers */
    .ticker-container:first-child:nth-last-child(3),
    .ticker-container:first-child:nth-last-child(3)~.ticker-container {
        flex: 30%;
    }
}

@media only screen and (min-width: 1000px) {
    /* 5 or 6 filter buttons */
    .buttons-wrapper div:first-child:nth-last-child(5),
    .buttons-wrapper div:first-child:nth-last-child(5) ~ .filter-button,
    .buttons-wrapper div:first-child:nth-last-child(6),
    .buttons-wrapper div:first-child:nth-last-child(6) ~ .filter-button {
        flex: 1 1 10%;
    }

    /* 4 tickers */
    .ticker-container:first-child:nth-last-child(4),
    .ticker-container:first-child:nth-last-child(4)~.ticker-container {
        flex: 25%;
    }
}

@media only screen and (min-width: 1100px) {
    /* Charts displaying side by side */
    .flourish-container {
        flex-direction: row;
        max-width: none;
    }

    .chart-container {
        flex: 45%;
        margin: 1rem;
    }
}