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

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #3d7c47; /* Restored original color */
    color: white;
    padding: 0.7rem; /* Restored original padding */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    height: auto; /* Allow header to fit content */
    flex-shrink: 0;
    display: flex; /* For centering content */
    flex-direction: column; /* Stack logo and paragraph */
    align-items: center; /* Center items horizontally */
    justify-content: center; /* Center items vertically if needed */
}

#site-logo {
    max-height: 100px; /* Increased logo size */
    /* margin-bottom removed for better flex centering */
}

main {
    flex: 1;
    position: relative;
    height: calc(100% - 60px);
    overflow: hidden;
}

/* Map styles */
#map-container {
    height: 100%;
    width: 100%;
}

#map {
    height: 100%;
    width: 100%;
}

/* Drawer styles */
.drawer {
    position: absolute;
    right: -400px;
    top: 0;
    width: 400px;
    max-width: 80%;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0;
}

.drawer-header {
    background: #3d7c47;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#close-drawer {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.drawer-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

/* Hike metadata styles */
.hike-metadata {
    margin-bottom: 1.5rem;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.label {
    font-weight: 600;
}

.elevation-chart-container {
    height: 200px;
    margin: 1.5rem 0;
}

/* Legend styles */
.legend {
    padding: 10px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.legend div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 20px;
    height: 10px;
    margin-right: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .drawer {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
}
