.ep-public-map {
    position: relative;
    width: 100%;
    min-height: 420px;
    height: min(70vh, 650px);
    overflow: hidden;
    border-radius: 10px;
}

.ep-routes-archive-map {
    width: 100%;
    margin: 0 0 24px;
}

.ep-route-controls {
    position: absolute;
    z-index: 1000;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ep-route-control-card {
    width: min(760px, 100%);
    overflow: hidden;
    color: #111827;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.ep-route-control-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .78);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.ep-route-collapse {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    padding: 7px 10px;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
}

.ep-route-collapse:hover,
.ep-route-collapse:focus-visible {
    background: #f8fafc;
}

.ep-route-collapse > span {
    flex: 0 0 auto;
    font-size: 15px;
    line-height: 1;
}

.ep-route-collapse strong {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-route-controls.is-collapsed .ep-route-control-card {
    width: max-content;
    max-width: 100%;
}

.ep-route-controls.is-collapsed .ep-route-control-body {
    display: none;
}

.ep-route-mini-actions,
.ep-route-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-route-mini-actions button,
.ep-route-actions button,
.ep-route-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 10px 12px;
    color: inherit;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
}

.ep-route-mini-actions button.is-active,
.ep-route-actions button.is-primary {
    color: #fff;
    background: #111827;
    border-color: #111827;
}

.ep-route-control-body {
    max-height: 56vh;
    padding: 12px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ep-route-description {
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 12px;
}

.ep-route-select-wrap {
    display: block;
    margin-bottom: 10px;
    color: #111827;
    font-size: 12px;
    font-weight: 800;
}

.ep-route-select-wrap span {
    display: block;
    margin-bottom: 5px;
}

.ep-route-select-wrap select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #111827;
    font-size: 14px;
    font-weight: 800;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
}

.ep-route-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 6px;
}

.ep-route-metrics > div {
    min-width: 92px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.1;
    background: rgba(0, 0, 0, .04);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 14px;
}

.ep-route-metrics b {
    display: block;
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 800;
}

.ep-route-actions {
    margin-top: 10px;
}

.ep-route-status {
    min-height: 1.4em;
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
    white-space: pre-wrap;
}

.ep-poi-card img {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    margin-bottom: 6px;
}

.ep-route-poi-icon-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent;
    border: 0;
}

.ep-route-poi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 2px 5px;
    color: #fff;
    background: #2271b1;
    border: 2px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
    font-size: 16px;
    line-height: 1;
    transform: rotate(-45deg);
}

.ep-route-poi-symbol {
    display: inline-block;
    transform: rotate(45deg);
}

.ep-map-message {
    position: absolute;
    z-index: 1000;
    top: 12px;
    right: 12px;
    left: 12px;
    padding: 10px 12px;
    color: #6b1b1b;
    background: #fff4f4;
    border: 1px solid #e3aaaa;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .ep-route-controls {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .ep-route-control-body {
        max-height: 62vh;
    }

    .ep-route-collapse strong {
        max-width: 52vw;
    }

    .ep-route-controls.is-collapsed .ep-route-collapse {
        max-width: 58vw;
    }

    .ep-route-actions button,
    .ep-route-actions a {
        flex: 1 1 auto;
        justify-content: center;
    }
}
