/* Base page layouts */
body {
    margin: 0;
    padding: 0;
}
#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100svh;
}

.glass-popup .maplibregl-popup-content {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 0.06rem solid rgba(255, 255, 255, 0.5);
    border-radius: 0.25rem !important;
    box-shadow: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem 1.75rem 0.5rem 0.5rem !important; /* Leave safe room for close icon */
}

.glass-popup .maplibregl-popup-close-button {
    color: darkred;
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    border-top-right-radius: 0.75rem;
    transition:
        background 0.5s,
        color 0.5s;
    outline: none;
}

.glass-popup .maplibregl-popup-close-button:hover {
    color: red;
    background: rgba(255, 255, 255, 0.3);
}

.maplibregl-popup-tip {
    display: none !important;
}

.popup-info-container {
    display: flex;
    flex-direction: column;
    max-width: 240px;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        sans-serif;
}
.popup-info {
    font-size: 1rem;
    color: #222;
    line-height: 1.4;
    font-weight: 550;
    word-wrap: break-word;
}

.popup-info.heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: #111;
    display: block;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.popup-info.heading > span {
    display: block;
    padding: 0;
    margin: 0;
}

.popup-info.subheading {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
    padding-left:0.75rem;
}

.popup-info.info {
    font-size: 0.85rem;
    color: #444;
    font-weight: 500;
    display: block;
    margin-bottom: 0.125rem;
    word-wrap: break-word;
}

.popup-info.info.last-line {
    border-top: 0.06rem dashed rgba(0, 0, 0, 0.1);
}


.glass-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: rgba(255, 255, 255, 0.85) !important;
}
.glass-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: rgba(255, 255, 255, 0.85) !important;
}
.glass-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: rgba(255, 255, 255, 0.85) !important;
}
.glass-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: rgba(255, 255, 255, 0.85) !important;
}

/* Valhalla routing styles */

.route-summary-card {
    font-size: 11px;
    color: #0070f3;
    font-weight: 700;
    margin-top: 6px;
    display: block;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
    padding-top: 6px;
    line-height: 1.4;
}

/* Floating Action Button for Routing Mode */
.map-action-btn {
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.25s ease;
}

/* Layout panel container wrapping elements together */
.routing-control-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Base button properties - remove position absolute since container handles it */
.map-action-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.15);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.map-action-btn.active-routing {
    background: #0070f3;
    color: #ffffff;
    border-color: #0056b3;
}

/* Sliding frosted-glass options configuration drawer card */
.options-tray {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-family: system-ui, sans-serif;
    font-size: 11px;
    font-weight: 550;
    color: #333;
    transition: all 0.25s ease;
    opacity: 1;
    transform: translateY(0);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-route-selection {
    cursor: pointer;
}

/* Hidden helper class states */
.hidden-tray {
    display: none !important;
    opacity: 0;
    transform: translateY(-10px);
}


/* Transit Selector Button Grid Layout */
.transit-modes-row {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.mode-btn:hover {
    background: #f0f0f0;
}

/* Marked state when a specific transit profile is selected */
.mode-btn.active-mode {
    background: #bedbfd;
    border-color: #0056b3;
    box-shadow: 0 0.1rem 0.5rem rgba(0, 112, 243, 0.2);
}

.avoidance-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.25rem;
}
