/* --- Starbucks-Inspired Modern Theme: FLAT COLORS ONLY --- */
body, html {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #D4E9E2;
    color: #1E3932;
}

/* --- Ensure map fills viewport and receives all touch events --- */
html, body {
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    top: 0; left: 0;
}
#map {
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    background: #D4E9E2;
    touch-action: none;
    z-index: 1;
}
.ol-viewport {
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    overflow: hidden !important;
    touch-action: none !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(30, 57, 50, 0.55); /* Starbucks dark green overlay */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}
.modal-content {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(30,57,50,0.18);
    padding: 32px 24px 24px 24px;
    max-width: 420px;
    width: 90%;
    border: 2px solid #00704A;
    text-align: center;
}
.modal-content h2 {
    color: #00704A;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: 0.02em;
}
#gpxButtons button {
    display: block;
    width: 100%;
    padding: 16px 0;
    margin-bottom: 14px;
    border: none;
    background: #00704A;
    color: #fff;
    font-size: 1.15em;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 2px 8px 0 rgba(30,57,50,0.10);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
}
#gpxButtons button:hover, #gpxButtons button:focus {
    background: #CBA258;
    color: #1E3932;
    box-shadow: 0 4px 16px 0 rgba(203,162,88,0.18);
}
#gpxButtons button:last-child { margin-bottom: 0; }

/* Style for hiding OpenLayers attribution on small screens */
@media (max-width: 600px) {
    html, body, #map, .ol-viewport {
        width: 100vw;
        height: 100vh;
        min-width: 100vw;
        min-height: 100vh;
        position: fixed;
        top: 0; left: 0;
    }
    .ol-zoom {
        top: 8px !important;
        left: 8px !important;
        gap: 10px;
    }
    .ol-zoom button {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.3em !important;
    }
    #map-controls {
        top: 110px;
        left: 8px;
        gap: 10px;
        margin-top: 10px;
    }
}

/* --- OpenLayers Zoom Controls: Starbucks Style & Alignment --- */
.ol-zoom {
    position: absolute;
    top: 18px !important;
    left: 18px !important;
    z-index: 51;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.ol-zoom button {
    background: #fff !important;
    border: 2px solid #00704A !important;
    color: #00704A !important;
    font-size: 1.7em !important;
    width: 54px !important;
    height: 54px !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px 0 rgba(30,57,50,0.10) !important;
    margin: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s, border 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
}
.ol-zoom button:focus {
    outline: 2.5px solid #CBA258 !important;
    outline-offset: 2px;
    border-color: #CBA258 !important;
}
.ol-zoom button:hover {
    background: #CBA258 !important;
    color: #fff !important;
    border-color: #CBA258 !important;
}

/* --- Map Controls: Place below zoom controls, never overlap --- */
#map-controls {
    position: absolute;
    top: 140px; /* Place below .ol-zoom (2 buttons * 54px + gap) */
    left: 18px;
    z-index: 50;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

/* Map Controls - Modern Glassy Starbucks Style (Flat Colors) */
#map-controls button {
    background: #fff;
    border: 2px solid #00704A;
    color: #00704A;
    font-size: 1.7em;
    width: 54px;
    height: 54px;
    margin: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    box-shadow: 0 2px 8px 0 rgba(30,57,50,0.10);
    transition: background 0.2s, border 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
}
#map-controls button:focus {
    outline: 2.5px solid #CBA258;
    outline-offset: 2px;
    border-color: #CBA258;
}
#map-controls button:hover {
    background: #CBA258;
    color: #fff;
    border-color: #CBA258;
}
#map-controls button.active {
    background: #00704A;
    color: #fff;
    border-color: #CBA258;
}

/* Map Controls: Icon Color Fixes */
#map-controls button svg {
    stroke: #00704A;
    fill: none;
    transition: stroke 0.2s, fill 0.2s;
}
#map-controls button:focus svg,
#map-controls button.active svg {
    stroke: #fff;
    fill: none;
}
#map-controls button:hover svg {
    stroke: #fff;
    fill: none;
}
/* For rotate (compass) button, use gold on active/hover */
#rotate-btn:focus svg, #rotate-btn.active svg, #rotate-btn:hover svg {
    stroke: #CBA258;
    fill: #CBA258;
}
/* For layer button, use dark green on active/hover */
#layer-btn:focus svg, #layer-btn.active svg, #layer-btn:hover svg {
    stroke: #1E3932;
    fill: #1E3932;
}

/* --- Remove OpenLayers .ol-control background and add spacing --- */
.ol-control {
    background: none !important;
    margin-bottom: 14px !important;
    padding-bottom: 0 !important;
    box-shadow: none !important;
} 