/* Reset and full-screen map styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Arial', sans-serif;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right {
    display: flex;
    align-items: center;
}

/* Nav center - truly centered on desktop, flexible on mobile */
.nav-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    pointer-events: none; /* Allow clicks to pass through to elements behind */
}

.nav-center .page-title {
    pointer-events: auto; /* Re-enable clicks on the title itself */
}

.nav-center .page-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.nav-center .page-title .subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 2px 0 0 0;
}

/* Hamburger Menu Button */
.hamburger-menu {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 5px;
    transition: all 0.3s ease;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu:hover span {
    background: #3498db;
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-text {
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-decoration: none;
}

/* Back Button (for content pages) */
.back-btn {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3498db;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: #fff;
    z-index: 3000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.side-menu.active {
    left: 0;
}

.menu-header {
    background: #34495e;
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-menu {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.close-menu:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-items li {
    border-bottom: 1px solid #eee;
}

.menu-items a {
    display: block;
    padding: 15px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
}

.menu-items a:hover {
    background: #f8f9fa;
    color: #f39c12;
    padding-left: 30px;
}

/* Enhanced menu styles for city pages */
.menu-divider {
    height: 1px;
    background: #eee;
    margin: 10px 0;
    border: none;
}

.menu-section {
    padding: 15px 20px 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}

.menu-detail {
    display: block;
    padding: 8px 20px;
    color: #555;
    font-size: 0.9rem;
    border-bottom: 1px solid #eee;
}

/* Page Wrapper */
.page-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Map Container (for homepage) */
#map {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px); /* Account for top navigation */
    background: #f0f0f0;
    margin-top: 60px; /* Account for fixed top navigation */
}

/* Solar Legend */
.solar-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 180px;
    font-size: 12px;
}

.solar-legend h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.legend-scale {
    margin-bottom: 8px;
}

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

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-note {
    font-size: 10px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Legend Controls */
.legend-controls {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.legend-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: #555;
    user-select: none;
}

.legend-checkbox input[type="checkbox"] {
    margin: 0;
    margin-right: 6px;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.legend-checkbox .checkmark {
    margin-left: 2px;
}

/* Info Icon with Tooltip */
.info-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: #fff;
    cursor: help;
    position: relative;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    vertical-align: top;
    top: -2px;
}

.info-icon:hover {
    background: linear-gradient(135deg, #2980b9, #1f628d);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Tooltip styling */
.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 14px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999999;
    pointer-events: none;
    max-width: 320px;
    white-space: normal;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tooltip arrow */
.info-icon::before {
    content: '';
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-bottom-color: #2c3e50;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999999;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Show tooltip on hover */
.info-icon:hover::after,
.info-icon:hover::before {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.2s;
}

/* Hide tooltip when not hovering */
.info-icon::after,
.info-icon::before {
    transition-delay: 0s;
}

/* Map Navigation Controls Position */
.mapboxgl-ctrl-top-left {
    top: 20px;
    left: 20px;
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
    margin: 0 0 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl-group button {
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl-group button:hover {
    background: rgba(52, 152, 219, 0.1);
}

/* Mapbox Popup Styling */
.mapboxgl-popup-close-button {
    font-size: 20px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 22px !important;
    color: #666 !important;
    font-weight: bold !important;
    text-align: center !important;
    cursor: pointer !important;
    /* Don't override padding, border, or background - let Mapbox handle click events */
}

.mapboxgl-popup-close-button:hover {
    color: #333 !important;
}

/* Bottom Toolbar */
.bottom-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(44, 62, 80, 0.3); /* 30% opacity */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1500;
    transition: bottom 0.3s ease;
}

.bottom-toolbar.hidden {
    bottom: -60px;
}



.toolbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
}

.toolbar-left,
.toolbar-center,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toolbar-center {
    flex: 1;
    justify-content: center;
}

.toolbar-spacer {
    width: 60px;
    flex-shrink: 0;
}

/* Compact Legend in Toolbar */
.toolbar-legend {
    display: none; /* Hidden on desktop by default */
}

.compact-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 11px;
    color: #333;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    height: 44px;
    min-height: 44px;
}

/* Mobile compact legend specific styles */
.compact-legend .legend-scale {
    display: flex;
    align-items: center;
    gap: 6px;
}

.compact-legend .legend-colors {
    display: flex;
    gap: 4px;
}

.compact-legend .legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.compact-legend .legend-label {
    font-size: 10px;
    color: #555;
    font-weight: 600;
    margin-bottom: 2px;
}

.compact-legend .legend-indicator {
    font-size: 12px;
    font-weight: bold;
    color: #666;
    user-select: none;
}

/* Desktop legend scale - restore original */
.solar-legend .legend-scale {
    margin-bottom: 8px;
}

.toolbar-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #3498db;
}



/* Geocoder suggestions - position above input with readable styling */
.mapboxgl-ctrl-geocoder .suggestions {
    position: absolute !important;
    bottom: 100% !important;
    top: auto !important;
    margin-bottom: 8px !important;
    margin-top: 0 !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    min-width: 300px !important;
    z-index: 9999 !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li {
    color: #2c3e50 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li:last-child {
    border-bottom: none !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li:hover,
.mapboxgl-ctrl-geocoder .suggestions > .active {
    background: rgba(52, 152, 219, 0.1) !important;
    color: #1a252f !important;
    transform: translateX(2px) !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li .mapboxgl-ctrl-geocoder--suggestion-title {
    font-weight: 600 !important;
    color: #2c3e50 !important;
    margin-bottom: 2px !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li .mapboxgl-ctrl-geocoder--suggestion-address {
    font-size: 12px !important;
    color: #7f8c8d !important;
    line-height: 1.3 !important;
}

/* Geocoder width controls */
.mapboxgl-ctrl-geocoder {
    width: 300px !important;
    min-width: 300px !important;
}

/* Details Button */
.details-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 10px 16px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.details-btn:hover::before {
    left: 100%;
}

.details-btn:hover {
    background: linear-gradient(135deg, #7c8bee 0%, #8b5fbf 100%);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.details-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.details-btn svg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.details-btn:hover svg {
    transform: translateY(3px) scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.details-btn span {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Toolbar Toggle Button */
.toolbar-toggle {
    position: absolute;
    bottom: 45px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: rgba(44, 62, 80, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    z-index: 1600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-toggle:hover {
    background: rgba(44, 62, 80, 1);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.toolbar-toggle.toolbar-visible {
    transform: rotate(180deg);
}

.toolbar-toggle.toolbar-visible:hover {
    transform: rotate(180deg) translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Details Section */
.details-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 20px 40px;
    display: flex;
    align-items: center;
    position: relative;
}

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

.details-content h2 {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 50px;
    font-weight: 300;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.detail-card h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.detail-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Details Footer */
.details-footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    user-select: none;
}

@media (max-width: 768px) {
    .details-content h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-card {
        padding: 20px;
    }
    
    .details-footer {
        margin-top: 40px;
    }
    
    .footer-links {
        gap: 10px;
    }
}

/* Content Pages Styles */
.content-container {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8f9fa;
    overflow-y: auto;
    overflow-x: hidden;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    min-height: calc(100vh - 60px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}



.page-content {
    line-height: 1.6;
    color: #2c3e50;
}

/* About Page Specific Styles - Restored Original */
.about-content section {
    margin-bottom: 40px;
}

.about-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.about-content h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.about-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

.about-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-content li {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #555;
}

/* Universal Content Page Styles - Copy of About Page */
.privacy-content section,
.terms-content section {
    margin-bottom: 40px;
}

.privacy-content h2,
.terms-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.privacy-content h3,
.terms-content h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.privacy-content p,
.terms-content p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: #555;
}

.privacy-content ul,
.terms-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.privacy-content li,
.terms-content li {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #555;
}

.privacy-content strong,
.terms-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.privacy-content a,
.terms-content a {
    color: #3498db;
    text-decoration: none;
}

.privacy-content a:hover,
.terms-content a:hover {
    text-decoration: underline;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-item p {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.5;
}

/* Contact Section */
.contact-section {
    background: #ecf0f1;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.contact-info {
    margin-top: 20px;
}

.contact-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .about-content h2,
    .privacy-content h2,
    .terms-content h2 {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        padding: 20px 15px;
    }
    
    .feature-icon {
        font-size: 2.5rem;
    }
    
    .hamburger-menu {
        font-size: 18px;
    }
    
    .mapboxgl-ctrl-top-left {
        top: 15px;
        left: 15px;
    }
    
    .mapboxgl-ctrl-top-left .mapboxgl-ctrl {
        margin: 0 0 8px 0;
    }
    
    .side-menu {
        width: 280px;
        left: -280px;
    }

    /* City page nav responsive */
    .nav-center .page-title h1 {
        font-size: 1.2rem;
    }
    
    /* Nav center - switch to flexible centering on mobile */
    .nav-center {
        position: static;
        left: auto;
        top: auto;
        transform: none;
        flex: 1;
        pointer-events: auto;
    }
    
    .nav-center .page-title {
        pointer-events: auto;
    }
    
    /* Hide back button on mobile to save screen space */
    .back-btn {
        display: none !important;
    }
    
    /* Hide regular legend on mobile */
    .solar-legend {
        display: none !important;
    }
    
    /* Show compact legend in toolbar on mobile */
    .toolbar-legend {
        display: block;
    }
    
    /* Hide desktop toolbar on mobile */
    .desktop-toolbar {
        display: none !important;
    }
    
    /* Show mobile toolbar only on mobile */
    .mobile-toolbar {
        display: flex !important;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.4);
        z-index: 1000;
        padding: 24px 20px 28px 20px;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        height: 160px;
        transition: bottom 0.3s ease;
    }
    
    .mobile-toolbar.hidden {
        bottom: -160px;
    }
    
    .mobile-toolbar-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    /* Row 1: Geocoder */
    .mobile-geocoder-row {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .mobile-geocoder {
        width: 100%;
        max-width: 500px;
    }
    
    /* Style the mobile geocoder properly */
    .mobile-geocoder .mapboxgl-ctrl-geocoder {
        width: 100% !important;
        background: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
        position: relative !important;
    }
    
    .mobile-geocoder .mapboxgl-ctrl-geocoder input[type="text"] {
        background: transparent !important;
        border: none !important;
        padding: 14px 50px 14px 60px !important;
        font-size: 16px !important;
        color: #333 !important;
        font-weight: 500 !important;
        width: calc(100% - 20px) !important;
        text-indent: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Position the search icon properly */
    .mobile-geocoder .mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--icon {
        position: absolute !important;
        left: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 10 !important;
    }
    
    .mobile-geocoder .mapboxgl-ctrl-geocoder input[type="text"]::placeholder {
        color: #666 !important;
        font-weight: 400 !important;
    }
    
    /* Row 2: Legend and Details */
    .mobile-bottom-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }
    
    /* Mobile Legend */
    .mobile-legend {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-radius: 8px;
        padding: 8px 12px;
        flex: 1;
        max-width: 200px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-legend-label {
        font-size: 11px;
        font-weight: 600;
        color: #444;
        margin-bottom: 2px;
    }
    
    .mobile-legend-scale {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .mobile-legend-colors {
        display: flex;
        gap: 3px;
    }
    
    .mobile-legend-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 1px solid rgba(0, 0, 0, 0.3);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-legend-indicator {
        font-size: 12px;
        font-weight: 600;
        color: #666;
    }
    
    /* Mobile Details Button */
    .mobile-details-btn {
        background: rgba(99, 102, 241, 0.9);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 12px 16px;
        font-size: 13px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        transition: background-color 0.2s ease;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .mobile-details-btn:hover {
        background: rgba(88, 85, 235, 0.9);
    }
    
    .mobile-details-btn svg {
        flex-shrink: 0;
    }
    
    /* Hide Mapbox navigation controls on mobile */
    .mapboxgl-ctrl-top-left {
        display: none !important;
    }
    
    .mapboxgl-ctrl-top-right .mapboxgl-ctrl-group:not(.mapboxgl-ctrl-attrib) {
        display: none !important;
    }
    
    .mapboxgl-ctrl-bottom-left {
        display: none !important;
    }
    
    .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl-group:not(.mapboxgl-ctrl-attrib) {
        display: none !important;
    }
    
    .toolbar-toggle {
        bottom: 147px !important;
        right: 8px;
        width: 26px;
        height: 26px;
        z-index: 1001;
        position: absolute !important;
    }
    

    
    .nav-center .page-title .subtitle {
        font-size: 0.8rem;
    }
}

/* Desktop styles - hide mobile toolbar */
@media (min-width: 769px) {
    .mobile-toolbar {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }
    
    .side-menu {
        width: 100%;
        left: -100%;
    }
    
    .content-wrapper {
        padding: 15px 10px;
    }
    
    /* Very narrow geocoder for small phones */
    .mapboxgl-ctrl-geocoder {
        width: 120px !important;
        min-width: 120px !important;
    }
    
    /* Ensure navigation controls stay hidden on small phones */
    .mapboxgl-ctrl-top-left {
        display: none !important;
    }
    
    .mapboxgl-ctrl-top-right .mapboxgl-ctrl-group:not(.mapboxgl-ctrl-attrib) {
        display: none !important;
    }
    
    .mapboxgl-ctrl-bottom-left {
        display: none !important;
    }
    
    .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl-group:not(.mapboxgl-ctrl-attrib) {
        display: none !important;
    }
    
    /* Adjust toggle button for small phones */
    .toolbar-toggle {
        bottom: 147px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }

    /* City page nav responsive */
    .nav-center .page-title h1 {
        font-size: 1.1rem;
    }
    
    .nav-center .page-title .subtitle {
        display: none; /* Hide subtitle on very small screens */
    }
}

/* Loading indicator styles */
.map-loading-overlay {
    position: fixed;
    bottom: 80px; /* Above bottom toolbar (60px height + 20px padding) */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Perfect centering */
    width: 280px;
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 1600; /* Above toolbar which is z-index 1500 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-left: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 16px;
    flex-shrink: 0;
}

.loading-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loading-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin: 0;
    line-height: 1.2;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive loading indicator */
@media (max-width: 768px) {
    .map-loading-overlay {
        bottom: 180px; /* Above mobile toolbar (160px height + 20px padding) */
        left: 50%; /* Keep the 50% left positioning */
        right: auto; /* Remove right positioning */
        width: calc(100vw - 20px); /* Full width minus 10px margins on each side */
        max-width: 300px; /* Maximum width constraint */
        transform: translateX(-50%); /* Keep the centering transform */
        margin: 0; /* Remove margin auto */
    }
    
    .loading-text {
        font-size: 14px;
    }
    
    .loading-subtext {
        font-size: 12px;
    }
} 