@charset "utf-8";

:root {
    font-family: sans-serif;
}


/* Chart (Graph) Panel */

#chartPanel {
    position: relative; /* for the error message overlay */

}
#chartPanel h3 {
    display: none;
}
#chartContainer {
    height: 75%;
}


/* Date Controls */

#dateControls {
    margin-top: 1rem;
    display: flex;
    justify-content: space-around;
    font-weight: bold;
}
button, input {
    font-weight: bold;
}
#prevNextButtons button {
    font-size: 0.7rem;
    height: 1.25rem;
}


/* GHG Equivalents Info Panel */

#ghgEquivalents {
    font-size: 0.75rem;
}
#ghgEquivalents h3 {
    display: none;
}
#ghgEquivalents h4 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
#ghgEquivalents > data {
    font-size: 2rem;
}
#ghgEquivalents ul {
    list-style-type: none;
    padding: 0;
}
#ghgEquivalents li {
    padding-left: 75px;
    min-height: 52px;
    margin-bottom: 0.5rem;
}
#ghgEquivalents li data {
    font-size: 1.25rem;
    display: block;
    font-weight: bold;
}
#ghgEquivalents li p {
    margin-top: 0;
}
#ghgEquivalents li:nth-of-type(1) {
    background-image: url("../images/car.png");
    background-repeat: no-repeat;
}
#ghgEquivalents li:nth-of-type(2) {
    background-image: url("../images/gas-pump.png");
    background-repeat: no-repeat;
}
#ghgEquivalents li:nth-of-type(3) {
    background-image: url("../images/phone.png");
    background-repeat: no-repeat;
}
#ghgEquivalents li:nth-of-type(4) {
    background-image: url("../images/trash.png");
    background-repeat: no-repeat;
}
#ghgEquivalents li:nth-of-type(5) {
    background-image: url("../images/led.png");
    background-repeat: no-repeat;
}
#ghgEquivalents li:nth-of-type(6) {
    background-image: url("../images/tree.png");
    background-repeat: no-repeat;
}


/* Chart Error Message Overlay */

.chartMessageOverlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    font-weight: normal;
    color: black;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.chartMessageOverlay.show {
    opacity: 1;
    visibility: visible;
}

.messageContentWrapper {
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    max-width: 80%; /* Prevent wrapper from being too wide */
}

#messageOkBtn {
    width: auto;
    height: auto;
    padding: 0.2rem 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 0.3rem;
}

#messageOkBtn:hover {
    background-color: #0056b3;
}


/* GHG Dashboard Responsive Layout */

@media screen and (width >= 768px), (orientation: landscape) {
    #ghgDashboard {
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
    }
    #chartPanel {
        width: 65%;
        display: flex;
        flex-direction: column;
    }
    #chartContainer {
        flex-basis: auto;
        flex-grow: 3;
    }
    #dateControls {
        flex-basis: auto;
        flex-grow: 1;
    }
    #ghgEquivalents {
        width: 35%;
        padding-left: 1rem;
    }
    #ghgEquivalents h4 {
        margin-top: 0;
    }
}

/* GHG Dashboard Button Layout Fix */
#dateControls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

#dateControls input[type="date"],
#dateControls button,
#prevNextButtons button,
#dateButtons button,
#chartMessage button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem; /* Vertical and horizontal padding preserved */
    font-size: 0.85rem;
    line-height: 1;
    margin: 0;
    border: 1px solid #000;
    box-sizing: border-box;
    appearance: none;
    background-color: white;
    height: auto; /* Let padding control height naturally */
}

/* Prev/Next Button Group Layout */
#prevNextButtons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Prev/Next Buttons and Label Consistent Sizing */
#prevNextButtons button,
#prevNextLabel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    line-height: 1;
    height: auto;
    margin: 0;
    box-sizing: border-box;
}
