body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column; /* Stack sections vertically */
}

.home-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #f4f4f4;
    padding: 20px;
}

.home-page h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.home-page p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
}

.home-page button {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.home-page button:hover {
    background-color: #0056b3;
}

.map-section {
    height: 100vh;
    display: none; /* Hidden by default */
    flex-direction: row; /* Divide into two columns */
}

.map-container {
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1px;
    box-sizing: border-box;
}

.controls-container {
    display: flex; /* Align items horizontally */
    gap: 10px; /* Space between elements */
    align-items: center;
    width: 100%; /* Ensure the container spans the full width */
    height: 8%;
    margin-bottom: 1px; /* Add spacing below the controls */
    padding-left: 50px;
    padding-right: 50px;
}

.map-section button {
    padding: 10px 15px;
    font-size: 1rem;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.map-section button:hover {
    background-color: #0056b3;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
}

.dropdown-content .menu-button {
    padding: 10px 15px;
    font-size: 1rem;
    background-color: white;
    color: #007BFF;
    border: none;
    text-align: left;
    width: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-content .menu-button:hover {
    background-color: #f4f4f4;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.search-container {
    flex-grow: 1;
    display: flex;
    position: relative;
}

#country-search {
    width: 100%;
    height: 40px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing:border-box;
}

.dropdown-list {
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    transform: none;
    list-style-type: none;
    margin: 0;
    padding: 0;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    z-index: 1000;
    display: none;
}

.dropdown-list li {
    padding: 8px;
    cursor: pointer;
}

.dropdown-list li:hover {
    background-color: #f0f0f0;
}

.legend-container {
    width: 10%;
}

#world-map {
    width: 100%;
    height: 100%;
    margin-left:auto;
}

#map-title {
    font-size: 3vh;
    text-align: center;
    margin-top: 0px;
    margin-bottom:0px;
    height: 4%;
}

.info-panel {
    width: 35%; /* Increase from 30% to 35% */
    background-color: #f9f9f9;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-left: 1px solid #ddd;
    overflow-y: auto; /* Allow the entire panel to scroll if needed */
    height: 100%; /* Ensure it takes full height */
}

.info-panel h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.info-panel p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.trip-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    padding-right: 15px; /* Increase right padding since we no longer have scrollbar */
}

.trip-details h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.trip-details p {
    margin: 0;
    font-size: 1rem;
}

.month-slider {
    width: 300px;
    margin: 5px;
    display: block;
}

/* Selected country styling */
.selected-country {
    stroke: #c629f1;
    stroke-width: 6px;
    stroke-linejoin: round;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    fill-rule: evenodd;
}

.data-section {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.data-section:last-child {
    border-bottom: none;
}

.data-section h4 {
    margin-bottom: 5px;
    color: #444;
}

.map-controls {
    display: flex;
    flex-direction: row;
}

.world-map-container {
    height:85%;
    width:100%;
    display:flex;
    flex-direction: row;
}

.home-country {
    stroke: #0066CC !important;
    stroke-width: 2px !important;
}

.destination-country {
    stroke: #CC0000 !important;
    stroke-width: 2px !important;
}

.selection-controls {
    margin: 10px 0;
    text-align: center;
}

.selection-btn {
    padding: 8px 12px;
    margin: 0 5px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.home-mode {
    background-color: #d9edf7;
    border: 1px solid #0066CC;
}

.destination-mode {
    background-color: #f2dede;
    border: 1px solid #CC0000;
}

.trip-overview {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
}

.destination-data h4 {
    color: #CC0000;
}

/* CO2 Emissions Comparison */
.co2-comparison {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    width: 100%;
}

.co2-comparison h4 {
    margin-bottom: 6px;
    color: #333;
    font-size: 1rem;
}

.co2-bar-container {
    margin-bottom: 12px;
    width: 100%;
}

.co2-label {
    margin-bottom: 5px;
    font-size: 0.9em;
    display: flex;
    justify-content: space-between;
}

.co2-bar {
    height: 20px; /* Decrease from 24px */
    border-radius: 4px;
    position: relative;
    min-width: 1%; /* Ensure very small values are still visible */
    transition: width 0.5s ease-in-out;
}

.annual-bar {
    background-color: #4CAF50;
    margin-bottom: 10px;
}

.trip-bar {
    background-color: #F44336;
}

.trip-bar.high-impact {
    background-color: #D32F2F;
    /* Add warning indicator */
    position: relative;
}

.trip-bar.high-impact::after {
    content: "⚠️";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}

.co2-value {
    font-weight: bold;
}

/* Country Comparison Styles */
.country-comparison {
    margin-top: 15px;
    border-top: 1px solid #ddd;
    padding-top: 8px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4px 8px; /* Reduce gap from 5px 10px */
    margin-top: 8px;
    font-size: 0.9em;
}

.comparison-header {
    font-weight: bold;
    padding: 4px;
    background-color: #f0f0f0;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.comparison-label {
    font-weight: bold;
    padding: 4px 0;
    border-bottom: 1px dotted #ddd;
}

/* Destination Details Styles */
.destination-details {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.detail-label {
    font-weight: bold;
    display: flex;
    align-items: center;
}

.detail-value {
    font-size: 1em;
    text-align: right;
    color: #333;
}

.country-charts-page {
    display: none; /* Hidden by default */
    height: 100vh;
    flex-direction:row;
    align-items: center;
    padding: 20px;
}

.country-charts-page svg {
    fill:#007BFF;
}

.country-charts-content {
    display: flex;
    flex-direction: row;
    gap: 5%;
}

.country-charts-page h1 {
    font-size: 2rem;
    margin-bottom: 0px;
}

.country-charts-page h3 {
    font-size: 1.5rem;
    margin-top: 5px;
    margin-bottom: 0px;
}

#temperature-chart svg{
    height: 60vh;
}

#uwh-list {
    flex-grow: 1;
    height: 60vh;
    border: 2px solid #ccc;
    overflow-y: scroll;
    font-family: sans-serif;
    border-radius: 5px;
    padding: 10px;
}
.entry {
    margin-bottom: 5px;
    padding: 5px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}
.entry:hover {
    background-color: #f4f4f4;
}

.uwh-site {
    cursor: pointer;
}