.yaruga-route-map {
    margin-top: 24px;
}

.yaruga-route-map-layout {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.yaruga-route-map-sources {
    display: grid;
    gap: 10px;
    align-content: start;
}

.yaruga-route-map-source {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e7e5e4;
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.yaruga-route-map-source input {
    margin-top: 3px;
}

.yaruga-route-map-source strong,
.yaruga-route-map-source span {
    display: block;
}

.yaruga-route-map-source span {
    margin-top: 3px;
    color: #78716c;
    font-size: .78rem;
}

.yaruga-route-map-load {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    background: #ea580c;
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.yaruga-route-map-status {
    min-height: 22px;
    color: #57534e;
    font-size: .86rem;
    line-height: 1.45;
}

.yaruga-route-map-status.error {
    color: #b91c1c;
}

.yaruga-route-map-shell {
    position: relative;
    width: 100%;
    min-height: 430px;
    border: 1px solid #d6d3d1;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ed, #f5f5f4);
}

.yaruga-route-map-placeholder {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    text-align: center;
    color: #57534e;
}

.yaruga-route-map-placeholder i {
    color: #ea580c;
    font-size: 2.5rem;
}

.yaruga-route-map-placeholder p {
    max-width: 620px;
    margin: 0;
    line-height: 1.55;
}

.yaruga-route-map-viewport {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: hidden;
    touch-action: none;
    cursor: grab;
    background: #e7e5e4;
    user-select: none;
}

.yaruga-route-map-viewport.dragging {
    cursor: grabbing;
}

.yaruga-route-map-viewport[hidden],
.yaruga-route-map-placeholder[hidden] {
    display: none;
}

.yaruga-route-map-tiles,
.yaruga-route-map-overlay {
    position: absolute;
    inset: 0;
}

.yaruga-route-map-overlay {
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.yaruga-route-map-overlay polyline,
.yaruga-route-map-overlay circle {
    vector-effect: non-scaling-stroke;
}

.yaruga-route-waypoint {
    pointer-events: auto;
    cursor: pointer;
}

.yaruga-route-map-tile {
    position: absolute;
    width: 256px;
    height: 256px;
    max-width: none;
    border: 0;
    pointer-events: none;
}

.yaruga-route-map-controls {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 14px;
    display: grid;
    gap: 7px;
}

.yaruga-route-map-control {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(28, 25, 23, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    color: #1c1917;
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(28, 25, 23, .16);
}

.yaruga-route-map-readout {
    position: absolute;
    z-index: 5;
    left: 14px;
    bottom: 34px;
    max-width: calc(100% - 28px);
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
    color: #292524;
    font-size: .76rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(28, 25, 23, .14);
}

.yaruga-route-map-attribution {
    position: absolute;
    z-index: 5;
    right: 8px;
    bottom: 5px;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .88);
    color: #57534e;
    font-size: .67rem;
}

.yaruga-route-map-attribution a {
    color: #1d4ed8;
}

.yaruga-route-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.yaruga-route-map-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f5f5f4;
    color: #44403c;
    font-size: .75rem;
    font-weight: 700;
}

.yaruga-route-map-legend-item i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.yaruga-route-map-point-info {
    display: grid;
    gap: 4px;
    min-height: 54px;
    margin-top: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #fafaf9;
    color: #57534e;
    font-size: .82rem;
}

.yaruga-route-map-point-info strong {
    color: #1c1917;
}

.yaruga-route-map-note {
    margin: 10px 0 0;
    color: #78716c;
    font-size: .78rem;
    line-height: 1.5;
}

.yaruga-route-map-shell:fullscreen {
    width: 100vw;
    height: 100vh;
    border: 0;
    border-radius: 0;
}

.yaruga-route-map-shell:fullscreen .yaruga-route-map-viewport {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
}

@media (max-width: 860px) {
    .yaruga-route-map-layout {
        grid-template-columns: 1fr;
    }

    .yaruga-route-map-sources {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 640px) {
    .yaruga-route-map-shell,
    .yaruga-route-map-placeholder {
        min-height: 340px;
    }

    .yaruga-route-map-viewport {
        min-height: 440px;
    }

    .yaruga-route-map-readout {
        bottom: 38px;
        font-size: .7rem;
    }
}
