/* Import the "Roboto" font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding: 20px;
}

.instructions {
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    color: #007BFF;
    font-weight: 700;
    letter-spacing: 1px;
}

.year-selectors {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
}

.year-selectors label {
    font-size: 1.2rem;
    font-weight: 500;
    color: #555;
}

.year-selectors select {
    padding: 10px 15px;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    transition: all 0.3s ease;
    font-family: 'Roboto', sans-serif;
}

/*.year-selectors select:hover {
    background-color: #007BFF;
    color: #fff;
    border-color: #007BFF;
    cursor: pointer;
}*/

.map-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.map {
    width: 48%;
    height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.info-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* Set the flex ratio so that the percent-change-details box is larger */
.info-box {
    flex: 1;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#percent-change-details strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 1px;
    color: #FF6347;
}

#percent-change-details p {
    color: #333;
    font-size: 1rem;
}

.info-box:hover {
    transform: translateY(-5px);
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: #007BFF;
    font-weight: 600;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 5px;
}

.info-box h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid #f0f2f5;
    color: #007BFF;
}

#percent-change-details h3{
    flex: 2;  /* Make this box take up more space */
    text-align: center;
    padding-bottom: 12.5px;
}

#percent-change-details h3 {
    color: #FF6347;
}

.info-box strong {
    font-size: 1rem;
    color: #007BFF;
    display: block;
    margin-bottom: 1px;
    font-weight: 500;
}

.info-box p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.6;
}

.button-container {
    margin-top: 10px;
    display: flex;
    justify-content: right; /* Center buttons within the container */
}

.toggle-button {
    padding: 6px 12px;
    background-color: #007bff41; /* Default background color */
    color: white; /* Text color */
    border: none; /* No border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    margin-right: 10px; /* Space between buttons */
    font-size: .8rem; /* Font size for readability */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transitions */
}

.toggle-button:hover {
    background-color: #007bffac; /* Darker green on hover */
    transform: translateY(-2px); /* Slight lift effect */
}

.toggle-button.selected {
    background-color: #007BFF; /* Blue color when selected */
}

.toggle-button.selected:hover {
    background-color: #006bdd; /* Darker blue when selected and hovered */
}

.info-header {
    display: flex; /* Use flexbox layout */
    align-items: center; /* Align items vertically in the center */
    justify-content: space-between; /* Space between the title and buttons */
    margin-bottom: 10px; /* Add some space below the header */
}


@media (max-width: 768px) {
    .map-container {
        flex-direction: column;
    }

    .map {
        width: 100%;
        margin-bottom: 20px;
    }

    .info-container {
        flex-direction: column;
    }

    .info-box {
        width: 100%;
    }
}

.legend {
    width: 200px;
    background-color: #fff;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.legend h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #007BFF;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
}
