body {
    max-width: 1660px;
    margin: 0 auto;
    font-family: 'Lato', Arial, sans-serif;
    font-size: 20px;
}

main {
    padding: 10px;
}

main p {
    line-height: 1.65em;
}

main a {
    color: #284162;
}

h1 {
    border-bottom: .18em solid #af3c43;
    border-image: linear-gradient(to right, #af3c43 71px, transparent 71px);
    border-image-slice: 1;
}

#chartControlsContainer {
    padding: 10px;
    display: flex;
    flex-direction: column;
}

#chartLegendContainer {
    display: none;
    padding: 10px;

}

#chartCanvasContainer {
    min-height: 50vh;
    max-height: 80vh;
    margin-top: 30px;
    /* Ensure it always takes full width of its container */
    width: 100%;
}

.light-grey-bg-with-shadow {
    background-color: #f5f5f5;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2), -1px -1px 4px rgba(0, 0, 0, 0.1);
}

.chartControlRow {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.chartControlRow label {
    margin-bottom: 5px;
}

.chartControlRow select {
    width: 100%;
    padding: 5px;
    font-size: 16px;
}

#chartContainer {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
}

.footerRow {
    color: white;
    padding: 20px;
}

.footerRow h3 {
    color: rgb(255, 255, 255, 0.9);
    font-size: 1.2em;
}

.footerRow ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footerRow li {
    margin: 10px 20px 10px 0px;
}

.footerRow a {
    color: rgb(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9em;
}

.footerRow a:hover {
    text-decoration: underline;
}

footer {
    margin-top: 20px;
    font-size: 1rem;
}

.usefulLinksSection {
    background-color: #26374a;
}

.buyMeACoffeeSection {
    background-color: #33465c;
}

.buyMeACoffeeSection ul {
    justify-content: center;
    margin: 10px 20px 10px 0px;
}

.buyMeACoffeeSection ul li {
    margin: 0;
}

.copyrightSection {
    background-color: #1c2835;
}

.copyrightSection a {
    font-size: 1em;
}

/*  */
/* loader */
/*  */

.loader {
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader::after {
    content: '';
    border: 8px solid #f3f3f3;
    border-top: 8px solid #af3c43;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/*  */
/* error */
/*  */

#errorMessage {
    background-color: #f8d7da;
    color: #af3c43;
    padding: 10px;
    border-radius: 5px;
}

@media (min-width: 568px) {
    #chartContainer {
        flex-direction: row;
    }

    #chartContainer.legendAndChartVisible #chartLegendContainer {
        width: 30%;
        margin-left: 20px;
        order: 2;
    }

    #chartContainer.legendAndChartVisible #chartCanvasContainer {
        width: 70%;
        margin-top: 0;
        order: 1;
    }

    #chartContainer.legendVisibleChartHidden #chartLegendContainer {
        width: 100%;
        margin-left: 0;
    }

    #chartContainer.legendVisibleChartHidden #chartCanvasContainer {
        display: none;
    }

    #chartControlsContainer {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 10px;
    }

    .chartControlRow {
        flex: 1 1 200px;
        padding: 10px;
    }
}