/* ========================================================================
   Выбор приложения для открытия маршрута
   ======================================================================== */

.brodnik-map-launcher[hidden] {
    display: none;
}

.brodnik-map-launcher {
    position: fixed;
    z-index: 1100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
}

.brodnik-map-launcher__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 29, 23, 0.48);
    backdrop-filter: blur(4px);
}

.brodnik-map-launcher__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    padding: 30px;
    border: 1px solid rgba(20, 61, 50, 0.18);
    border-radius: 24px;
    background: #fffdf8;
    box-shadow: 0 22px 72px rgba(10, 28, 20, 0.28);
}

.brodnik-map-launcher__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #637167;
    cursor: pointer;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

.brodnik-map-launcher__close:hover {
    background: #edf0e9;
    color: #143d32;
}

.brodnik-map-launcher__close:focus-visible,
.brodnik-map-launcher__provider:focus-visible {
    outline: 2px solid #b36536;
    outline-offset: 3px;
}

.brodnik-map-launcher__eyebrow {
    margin: 0 0 8px;
    color: #b36536;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.brodnik-map-launcher__title {
    margin: 0;
    color: #143d32;
    font-family: inherit;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.brodnik-map-launcher__lead {
    margin: 9px 0 20px;
    color: #637167;
    font-size: 15px;
    line-height: 1.5;
}

.brodnik-map-launcher__providers {
    display: grid;
    gap: 10px;
}

.brodnik-map-launcher__provider {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 18px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 74px;
    padding: 12px;
    border: 1px solid rgba(20, 61, 50, 0.16);
    border-radius: 16px;
    background: #fffdf8;
    color: #143d32;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition:
            border-color 0.2s ease,
            background-color 0.2s ease,
            transform 0.2s ease,
            box-shadow 0.2s ease;
}

.brodnik-map-launcher__provider:hover {
    border-color: #143d32;
    background: #f3f5ef;
    box-shadow: 0 6px 16px rgba(20, 61, 50, 0.08);
    transform: translateY(-1px);
}

.brodnik-map-launcher__provider-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    overflow: hidden;
    border: 1px solid rgba(20, 61, 50, 0.10);
    border-radius: 13px;
    background: #ffffff;
    color: #143d32;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.brodnik-map-launcher__provider-badge_yandex {
    background: #ffffff;
}

.brodnik-map-launcher__provider-badge_2gis {
    background: #ffffff;
}

.brodnik-map-launcher__provider-icon {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
}

.brodnik-map-launcher__provider-badge-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.brodnik-map-launcher__provider-badge.is-icon-failed {
    background: #143d32;
    color: #ffffff;
}

.brodnik-map-launcher__provider-badge_2gis.is-icon-failed {
    background: #e6f2db;
    color: #2f7229;
    font-size: 13px;
    letter-spacing: -0.07em;
}

.brodnik-map-launcher__provider-badge.is-icon-failed .brodnik-map-launcher__provider-icon {
    display: none;
}

.brodnik-map-launcher__provider-badge.is-icon-failed .brodnik-map-launcher__provider-badge-fallback {
    display: inline-flex;
}

.brodnik-map-launcher__provider-content {
    min-width: 0;
}

.brodnik-map-launcher__provider-title,
.brodnik-map-launcher__provider-text {
    display: block;
}

.brodnik-map-launcher__provider-title {
    color: #143d32;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.brodnik-map-launcher__provider-text {
    margin-top: 3px;
    color: #69766d;
    font-size: 13px;
    line-height: 1.35;
}

.brodnik-map-launcher__provider-arrow {
    color: #b36536;
    font-size: 20px;
    line-height: 1;
}

.brodnik-map-launcher-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .brodnik-map-launcher {
        align-items: end;
        padding: 12px;
    }

    .brodnik-map-launcher__dialog {
        width: 100%;
        padding: 24px 18px 20px;
        border-radius: 22px 22px 16px 16px;
    }

    .brodnik-map-launcher__title {
        padding-right: 36px;
        font-size: 25px;
    }

    .brodnik-map-launcher__lead {
        margin-bottom: 17px;
        font-size: 14px;
    }

    .brodnik-map-launcher__provider {
        min-height: 68px;
        grid-template-columns: 42px minmax(0, 1fr) 16px;
        gap: 10px;
        padding: 10px;
        border-radius: 14px;
    }

    .brodnik-map-launcher__provider-badge {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .brodnik-map-launcher__provider-icon {
        padding: 7px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .brodnik-map-launcher__provider {
        transition: none;
    }
}
