* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;  
}

body {
    margin: 2rem;
    font-family: "Lato", Helvetica, sans-serif;
    background-color: #1d2b39;
    color: #e0e0e0;
}

text {
    pointer-events: none;
}

a {
    color: #e0e0e0;
    background-color: #1d2b39;
    text-decoration: none;
}

a h3 {
    padding: 0.8rem;
    border-radius: 5px;
}

.nav-menu:hover {
    cursor: pointer;
    background-color: #2c3f4f;
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: -1.5rem;
}

.nav-title {
    margin-left: 1.2rem;
}

nav div {
    display: flex;
    flex-direction: row;
    gap: 2rem;
}


.title {
    font-size: xx-large;
    font-weight: bold;
    text-align: center;
    width: 100%;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-wrapper {
    border-radius: 12px;
    background-color: #2c3f4f;
    overflow: hidden;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    width: 45%;
    cursor: pointer;
}

.header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 1rem 2% 1rem 2%;
    height: auto;
    flex-wrap: wrap;
}

.trump-section, .harris-section {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 40%;
    gap: 3rem;
    color: #e0e0e0;
}

.trump-profile, .harris-profile {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    align-items: center;
}

#trump-vote-totals, #harris-vote-totals {
    padding-bottom: 2rem;
    font-size: 400%;
    font-weight: bold;
}

.trump-header-text, .harris-header-text {
    font-weight: bold;
    font-size: x-large;
}

#map {
    width: 60%;
}

img {
    width: 60%;
    height: auto;
    border-radius: 100%;
    margin-bottom: 0.8rem;
}

.electoral-bar {
    width: 100%;
    height: 30px; /* Adjust the height of the electoral bar */
    overflow: hidden;
    position: relative;
    font-weight: bold;
    color: #e0e0e0;
}

.candidate {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
}

.trump-electoral {
    background-color: #d22532;
    left: 0;
}

.harris-electoral {
    background-color: #244999;
    right: 0;
}

.electoral-bar-split {
    display: flex;
    align-items: center;
    width: 100%;
}

.candidate-section {
    display: flex;
    height: 30px;
    width: 100%;
}

#harrisEV {
    background-color: #244999; /* Blue for Harris */
}

#trumpEV {
    background-color: #d22532; /* Red for Trump */
}

.electoral {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: bold;
    height: 100%;
}

.popup-header {
    margin-bottom: 0.5rem;
    text-align: center;
}

.trump {
    height: 40px;
    display: flex;
    gap: 3rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.trump p {
    font-size: 16px;
    font-weight: bold;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}


.harris {
    height: 40px;
    display: flex;
    gap: 3rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    align-items: center;
    width: 100%;
    justify-content: space-between;

}

.harris p {
    font-size: 16px;
    font-weight: bold;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.state-data {
    padding-left: 0;
    margin: 2rem 0 2rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #e0e0e0;
}

#graph-title {
    text-align: center;
    margin: 2rem 0 2rem 0;
}

#chart-container {
    margin-left: 20%;
    margin-right: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-direction: column;
}

#state-data-inner {
    margin: 2rem 0 2rem 0;
}

#harrisEV .safe {
    background-color: #244999;
}

#harrisEV .likely {
    background-color: #577ccc;
}

#harrisEV .lean {
    background-color: #8aafff;
}

#harrisEV .tilt {
    background-color: #949bb3;
}

#trumpEV .tilt {
    background-color: #cf8980;
}

#trumpEV .lean {
    background-color: #ff8b98;
}

#trumpEV .likely {
    background-color: #ff5865;
}
#trumpEV .safe {
    background-color: #d22532;
}

.safe_democrat {
    fill: #244999;
    background-color: #244999;
}

.likely_democrat {
    fill: #577ccc;
    background-color: #577ccc;
}

.leans_democrat {
    fill: #8aafff;
    background-color: #8aafff;
}

.tilt_democrat {
    fill: #949bb3;
    background-color: #949bb3;
}

.safe_republican {
    fill: #d22532;
    background-color: #d22532;
}

.likely_republican {
    fill: #ff5865;
    background-color: #ff5865;
}

.leans_republican {
    fill: #ff8b98;
    background-color: #ff8b98;
}

.tilt_republican {
    fill: #cf8980;
    background-color: #cf8980;
}

.tossup {
    fill: gray;
    background-color: gray;
}

.methodology-container {
    margin: 0 30% 0 30%;
}

.methodology-container h1 {
    text-align: center;
}

@media (max-width: 900px) {
    img {
        width: 80%;
    }

    #map {
        width: 120%;
    }

    .title {
        font-size: large;
    }

    .header-wrapper {
        width: 100%;
    }

    .trump-section, .harris-section {
        flex-direction: column;
        gap: 0;
    }

    #trump-vote-totals, #harris-vote-totals {
        padding: 0;
        margin: 0;
        font-size: x-large;
    }

    .state-data {
        margin: 0;
    }

    #state-data-inner {
        margin: 0;
    }

    #chart-container {
        margin: 0;
    }

    .methodology-container {
        margin: 0;
    }

    a h3 {
        padding: 0.5rem;
    }
    
    nav {
        margin-top: -1.5rem;
    }
    
    .nav-title {
        margin-left: 0rem;
    }
}