/* Styles for the atlas page */
#map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background-color: #181818;
    border-radius: 5px;
    overflow: hidden;
}

/* Ensure the wrapper style1 background and text colors match right-sidebar */
.wrapper.style1 {
    background: #242943;
    color: #ffffff;
}

.wrapper.style1 h2, 
.wrapper.style1 h3, 
.wrapper.style1 p {
    color: #ffffff;
}

.wrapper.style1 .major h2,
.wrapper.style1 .major p {
    color: #ffffff;
}

#resort-stats-container {
    background-color: #181818;
    border-radius: 5px;
    padding: 20px;
    color: #ffffff;
}

#resort-stats-container h3 {
    color: #ffffff;
}

.detailed-statistics-section {
    color: #ffffff;
}

.north-arrow {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(30, 30, 30, 0.85);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
    color: #fff;
}

/* Map control styles - modified to not override map.css essential functionality */
.leaflet-control-zoom,
.leaflet-control-attribution {
    color: #333;
}

/* Layer Control Styles - without the aggressive !important flags */
.leaflet-control-layers {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
    margin-bottom: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.leaflet-control-layers-expanded {
    padding: 6px 10px 6px 6px;
    color: #333;
}

.leaflet-control-layers-list {
    color: #333;
}

.leaflet-control-layers-overlays label {
    display: flex;
    align-items: center;
    margin: 5px 0;
    color: #333;
}

.leaflet-control-layers-overlays input {
    margin-right: 5px;
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

/* Trail difficulty and feature styles - with reduced importance flags */
.leaflet-control-layers-overlays .legend-easy,
.leaflet-control-layers-overlays label:contains('Easy') {
    color: #008000;
}

.leaflet-control-layers-overlays .legend-intermediate,
.leaflet-control-layers-overlays label:contains('Intermediate') {
    color: #0000FF;
}

.leaflet-control-layers-overlays .legend-advanced,
.leaflet-control-layers-overlays label:contains('Advanced') {
    color: #000000;
}

.leaflet-control-layers-overlays .legend-expert,
.leaflet-control-layers-overlays label:contains('Expert') {
    color: #000000;
    font-weight: bold;
}

.leaflet-control-layers-overlays .legend-snowpark,
.leaflet-control-layers-overlays label:contains('Snow Park') {
    color: #FF8C00;
}

.leaflet-control-layers-overlays .legend-lift,
.leaflet-control-layers-overlays label:contains('Lift') {
    color: #FF0000;
}

.leaflet-control-layers-overlays .legend-boundary,
.leaflet-control-layers-overlays label:contains('Boundary') {
    color: #800080;
}

/* Map legend background for dark mode */
.map-legend {
    background: #f5f5f5 !important;
    color: #222 !important;
    box-shadow: 0 1px 5px rgba(0,0,0,0.15);
}

.map-legend .legend-title,
.map-legend .legend-item,
.map-legend .legend-text {
    color: unset !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stats-grid div {
    text-align: center;
    background: rgba(255, 255, 255, 0.07);
    padding: 15px;
    border-radius: 5px;
    color: #fff;
}

.stats-grid .stat-value {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stats-grid .stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.lift-types ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lift-types li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    color: #fff;
}

.lift-types li:last-child {
    border-bottom: none;
}

/* Resort contact information styling */
.resort-contact-info {
    margin-top: 15px;
    padding: 15px;
    background-color: #222;
    border-radius: 5px;
    border-left: 4px solid #2c82c9;
    color: #fff;
}

.resort-contact-info h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c82c9;
}

.resort-contact-info a {
    color: #2c82c9;
    text-decoration: none;
}

.resort-contact-info a:hover {
    text-decoration: underline;
}

/* === ATLAS PAGE THEME SETTINGS === */
/* Dark theme for atlas page - with minimal !important flags */
body.is-preload #page-wrapper,
.wrapper.style1,
#main {
    background: #1c1d26;
    color: #fff;
}

/* AI style buttons for dark background */
.ai-style-buttons .button {
    background: #222;
    color: #fff;
    border: 1px solid #444;
}

.ai-style-buttons .button.selected {
    background: #2c82c9;
    color: #fff;
    border: 1px solid #2c82c9;
}

/* AI controls and output */
#ai-description,
#ai-output {
    background: transparent;
    color: #fff;
}