.mapa-signlab-route-map {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    --ms-route-accent: #b6be1a;
    --ms-route-accent-text: #ffffff;
    --ms-route-secondary-button: #5a6472;
    --ms-route-button-route: #b6be1a;
    --ms-route-border: #ddd;
    --ms-route-card-active-border: #97b129;
    --ms-route-card-active-accent: #ff6b00;
    --ms-route-text: #333;
    --ms-route-muted: #666;
    --ms-route-surface: #fff;
    --ms-route-sidebar-bg: #fff;
    --ms-route-card-bg: #fff;
    --ms-route-map-height: 500px;
    --ms-route-sheet-handle: #d9e0e7;
}

.ms-route-layout {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background: var(--ms-route-surface);
    border: 1px solid var(--ms-route-border);
    font-family: 'Aller', sans-serif;
    position: relative;
}

.ms-route-sidebar {
    flex: 0 0 38%;
    max-width: 500px;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    row-gap: 10px;
    height: 100%;
    min-height: 0;
    padding: 18px 22px;
    overflow: hidden;
    box-sizing: border-box;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--ms-route-sidebar-bg) 92%, #f8fbff) 0%, var(--ms-route-sidebar-bg) 100%);
    border-right: 1px solid var(--ms-route-border);
    box-shadow: 12px 0 38px rgba(15, 23, 42, 0.06);
    z-index: 2;
}

.ms-route-sheet-handle,
.ms-route-mobile-nav {
    display: none;
}

.ms-route-sidebar__filters {
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    row-gap: 8px;
    min-height: 0;
}

.ms-route-list-wrap {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.ms-route-heading {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--ms-route-heading, #97b129);
}

.ms-route-subheading {
    margin: 0 0 6px;
    font-size: 0.92rem;
    color: var(--ms-route-muted);
}

.ms-route-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-route-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ms-route-sidebar-bg) 84%, #f4f7fb);
    border: 1px solid var(--ms-route-border);
    color: var(--ms-route-text);
    font-size: 0.82rem;
    line-height: 1.2;
}

.ms-route-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    box-shadow: 0 0 0 2px #fff;
}

.ms-route-term-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ms-route-term-filters__button {
    appearance: none;
    border: 1px solid var(--ms-route-border);
    background: #fff;
    color: var(--ms-route-text);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    line-height: 1.2;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ms-route-term-filters__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.09);
}

.ms-route-term-filters__button.is-active {
    border-color: color-mix(in srgb, var(--ms-route-term-color, var(--ms-route-card-active-accent)) 65%, #ffffff);
    background: color-mix(in srgb, var(--ms-route-term-color, var(--ms-route-card-active-accent)) 16%, #ffffff);
    color: #17324d;
}

.ms-route-term-filters__button[data-term-filter-all].is-active {
    border-color: var(--ms-route-card-active-accent);
    background: color-mix(in srgb, var(--ms-route-card-active-accent) 15%, #ffffff);
}

.ms-route-search {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ms-route-search__label {
    font-size: 0.92rem;
    color: var(--ms-route-text);
}

.ms-route-search__input {
    width: 100%;
    padding: 11px 13px;
    font-size: 0.95rem;
    border-radius: 12px;
    color: var(--ms-route-text);
    background: #fff;
    border: 1px solid var(--ms-route-border);
    box-shadow: inset 0 2px 5px rgb(0 0 0 / 0.05);
}

.ms-route-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    padding-right: 6px;
    box-sizing: border-box;
}

.ms-route-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--ms-route-item-color, var(--ms-route-border)) 30%, var(--ms-route-border));
    border-left: 6px solid var(--ms-route-item-color, var(--ms-route-border));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--ms-route-card-bg) 94%, #ffffff) 0%, var(--ms-route-card-bg) 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}

.ms-route-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.ms-route-card.is-hidden {
    display: none;
}

.ms-route-card.is-active {
    border-color: var(--ms-route-card-active-accent);
    border-left-color: var(--ms-route-card-active-accent);
    background: color-mix(in srgb, var(--ms-route-card-bg) 86%, var(--ms-route-card-active-accent));
    box-shadow: 0 18px 34px color-mix(in srgb, var(--ms-route-card-active-accent) 16%, transparent);
}

.ms-route-card__image-wrap {
    width: 108px;
    height: 108px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 14px;
    background: #f0f0f0;
}

.ms-route-card__image {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.ms-route-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.ms-route-card__title {
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--ms-route-text);
    margin-bottom: 4px;
}

.ms-route-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ms-route-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #17324d;
    background: color-mix(in srgb, var(--ms-route-item-color, #dbeafe) 18%, #fff);
    border: 1px solid color-mix(in srgb, var(--ms-route-item-color, #dbeafe) 55%, #fff);
}

.ms-route-card__excerpt {
    font-size: 0.89rem;
    line-height: 1.52;
    color: var(--ms-route-muted);
}

.ms-route-card__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    align-items: center;
}

.ms-route-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ms-route-accent-text);
    background: var(--ms-route-accent);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
    border: 0;
}

.ms-route-card__button--map {
    cursor: pointer;
    background: var(--ms-route-secondary-button);
}

.ms-route-card__button--route {
    background: var(--ms-route-button-route);
}

.ms-route-card__button:hover {
    color: var(--ms-route-accent-text);
    transform: translateY(-1px);
}

.ms-route-card__button.is-hidden {
    display: none;
}

.ms-route-search__input:focus-visible,
.ms-route-card__button:focus-visible,
.ms-route-marker__button:focus-visible,
.ms-route-term-filters__button:focus-visible,
.ms-route-mobile-nav__button:focus-visible,
.ms-route-endpoint__button:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--ms-route-card-active-accent) 45%, white);
    outline-offset: 2px;
}

.ms-route-map-wrap {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--ms-route-surface);
    height: 100%;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.ms-route-map {
    width: 100%;
    height: 100% !important;
    flex: 1 1 auto;
}

.wpb_text_column:has(> .mapa-signlab-route-map) {
    height: 100%;
    min-height: 100%;
    margin-bottom: 0 !important;
    overflow: hidden;
}

.wpb_text_column:has(> .mapa-signlab-route-map) > .mapa-signlab-route-map {
    height: 100%;
    min-height: 100%;
}

.wpb_wrapper:has(> .wpb_text_column > .mapa-signlab-route-map) {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.vc_column-inner:has(.mapa-signlab-route-map) {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.vc_column-inner:has(.mapa-signlab-route-map) > .wpb_wrapper {
    height: 100%;
    min-height: 100%;
}

.vc_column_container:has(.mapa-signlab-route-map) {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

.ms-route-elevation {
    width: 100%;
    flex: 0 0 auto;
    border-top: 1px solid var(--ms-route-border);
    background: #fff;
}

.ms-route-map-loader {
    position: absolute;
    inset: 0 0 auto 0;
    height: 100%;
    background: linear-gradient(90deg, #eee 25%, #ddd 50%, #eee 75%);
    background-size: 200% 100%;
    animation: ms-route-shimmer 1.5s infinite;
    z-index: 1;
    pointer-events: none;
}

.ms-route-marker {
    background: transparent;
    border: 0;
}

.ms-route-marker--hidden {
    opacity: 0;
    pointer-events: none;
}

.ms-route-marker__button {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    position: relative;
    cursor: pointer;
}

.ms-route-marker__dot {
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    background: var(--ms-route-marker-color, #ff6b00);
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.28);
}

.ms-route-marker__icon-wrap {
    position: relative;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ms-route-marker__icon-wrap img {
    width: 18px;
    height: 18px;
    display: block;
    filter: brightness(0) invert(1);
}

.ms-route-endpoint {
    background: transparent;
    border: 0;
}

.ms-route-endpoint__button {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
}

.ms-route-endpoint__inner {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ms-route-endpoint-color, #0f9d58);
    border: 3px solid #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.24);
}

.ms-route-popup__category {
    margin-top: 4px;
    font-size: 0.82rem;
    color: #5b6471;
}

.ms-route-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ms-route-popup__button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    background: var(--ms-route-secondary-button) !important;
    color: #fff !important;
    font-size: 0.82rem;
    font-weight: 700;
}

.ms-route-popup__button--secondary {
    background: var(--ms-route-button-route);
}

@keyframes ms-route-shimmer {
    100% {
        background-position-x: -200%;
    }
}

@media (max-width: 900px) {
    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-layout {
        flex-direction: column;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-sidebar {
        position: relative;
        max-width: none;
        width: 100%;
        height: auto;
        border-right: 0;
        border-top: 0;
        border-bottom: 1px solid var(--ms-route-border);
        border-radius: 0;
        box-shadow: none;
        grid-template-rows: auto auto minmax(0, 1fr);
        padding: 18px 16px;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-card {
        flex-direction: column;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-card__image-wrap {
        width: 100%;
        height: 190px;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-card__actions {
        justify-content: stretch;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="0"] .ms-route-card__button {
        width: 100%;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-layout {
        min-height: 0;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-map-wrap {
        height: 100%;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        max-width: none;
        width: 100%;
        height: auto;
        max-height: 92%;
        border-right: 0;
        border-top: 1px solid var(--ms-route-border);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.18);
        background: color-mix(in srgb, var(--ms-route-sidebar-bg) 94%, #ffffff);
        padding: 10px 14px 12px;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-sheet-handle {
        display: flex;
        justify-content: center;
        padding: 2px 0 8px;
        cursor: pointer;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-sheet-handle__pill {
        width: 46px;
        height: 5px;
        border-radius: 999px;
        background: #214f2c;
        display: block;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-mobile-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: min-content;
        gap: 8px;
        padding-top: 6px;
        align-items: center;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-mobile-nav__button {
        appearance: none;
        border: 1px solid #214f2c;
        background: #214f2c;
        color: #ffffff;
        border-radius: 12px;
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        padding: 8px 10px;
        font-weight: 700;
        cursor: pointer;
        align-self: center;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"] .ms-route-mobile-nav__button.is-active {
        background: #2b6338;
        border-color: #2b6338;
        box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="map"] .ms-route-sidebar {
        height: 112px;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="map"] .ms-route-sidebar__filters,
    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="map"] .ms-route-list-wrap {
        display: none;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="list"] .ms-route-sidebar {
        height: min(68%, 540px);
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="list"] .ms-route-sidebar__filters {
        display: none;
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="filters"] .ms-route-sidebar {
        height: min(84%, 680px);
    }

    .mapa-signlab-route-map[data-mobile-sheet-enabled="1"][data-mobile-view="filters"] .ms-route-list-wrap {
        display: none;
    }

}
