* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; overflow: hidden; }
#map { width: 100vw; height: 100vh; }

/* Demo badge */
.demo-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.demo-badge svg {
    width: 14px;
    height: 14px;
    stroke: #fff;
    opacity: 0.8;
}

/* Style switcher */
.style-switcher {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.style-btn {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.style-btn:hover { background: rgba(0,0,0,0.06); color: #1a1a1a; }
.style-btn.active { background: #1a1a1a; color: #fff; }

/* Routing panel - positioned below style switcher and SDK nav control */
.routing-panel {
    position: absolute;
    top: 136px;
    right: 12px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    min-width: 210px;
    max-width: 240px;
}

.routing-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.routing-header svg {
    color: #2563eb;
}

.routing-profile-row {
    margin-bottom: 10px;
}

.routing-profile-row select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: auto;
}

.routing-profile-row select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.routing-instructions {
    font-size: 11px;
    color: #888;
    text-align: center;
    padding: 4px 0;
    line-height: 1.4;
}

.routing-result {
    padding: 8px 0 4px;
    border-top: 1px solid #eee;
    margin-top: 6px;
}

.routing-result-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    padding: 3px 0;
}

.routing-result-row svg {
    color: #2563eb;
    flex-shrink: 0;
}

.routing-clear-btn {
    width: 100%;
    margin-top: 8px;
    padding: 6px 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.routing-clear-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Start/End marker styles */
.route-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
}

.route-marker-start {
    background: #22c55e;
}

.route-marker-end {
    background: #ef4444;
}

/* Hide default attribution/logo */
.maplibregl-ctrl-attrib { display: none !important; }
.maplibregl-ctrl-logo { display: none !important; }

/* Adjust search control - move below style switcher on right side */
.maplibregl-ctrl-top-left .ktmp-search-control {
    margin-top: 4px !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .routing-panel {
        min-width: 170px;
        max-width: 190px;
        padding: 10px 12px;
        top: 50px;
    }

    .style-switcher {
        right: 8px;
        top: 8px;
    }

    .demo-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
}
