/* =========================================================
   DRIVELUX CHILD ROUTES
   ========================================================= */

.dlx-child-routes-wrap {
    --dlx-accent: #c9974f;
    --dlx-text: #24272d;
    --dlx-muted: #717780;
    --dlx-border: #e4e5e7;
    --dlx-bg: #fff;

    width: 100%;
}


/* =========================================================
   SECTION
   ========================================================= */

.dlx-child-routes-section {
    padding-top: 30px;
    padding-bottom: 30px;
}

.dlx-child-routes__title {
    margin-top: 0;
    font-size: 1.6rem;
    line-height: 1.25;
    text-align: center;
}


/* =========================================================
   GRID
   ========================================================= */

.dlx-child-routes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    width: 100%;
}

.dlx-child-routes--cols-1 {
    grid-template-columns: 1fr;
}

.dlx-child-routes--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dlx-child-routes--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dlx-child-routes--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* =========================================================
   CARD
   ========================================================= */

.dlx-route-item {
    min-width: 0;
    margin: 0;

    border: 1px solid var(--dlx-border);
    border-radius: 7px;

    background: var(--dlx-bg);

    overflow: hidden;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease,
        opacity .25s ease;
}

.dlx-route-item[hidden],
.dlx-route-item--hidden {
    display: none !important;
}

.dlx-route-item:hover {
    border-color: rgba(201, 151, 79, .55);
    box-shadow: 0 8px 24px rgba(20, 24, 31, .07);
    transform: translateY(-1px);
}


/* =========================================================
   CARD LINK

   По умолчанию:
   Destination | CTA

   Это как раз вариант для списка аэропортов,
   где нет duration и distance.
   ========================================================= */

.dlx-route-item__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 185px;
    align-items: center;

    min-height: 58px;

    color: var(--dlx-text);
    text-decoration: none;
}


/* =========================================================
   ЕСЛИ ЕСТЬ ТОЛЬКО ОДИН META-ПАРАМЕТР

   Destination | Meta | CTA
   ========================================================= */

.dlx-route-item__link:has(.dlx-route-item__meta) {
    grid-template-columns:
        minmax(180px, 1fr)
        minmax(105px, .55fr)
        165px;
}


/* =========================================================
   ЕСЛИ ЕСТЬ DURATION + DISTANCE

   Destination | Duration | Distance | CTA
   ========================================================= */

.dlx-route-item__link:has(.dlx-route-item__duration):has(.dlx-route-item__distance) {
    grid-template-columns:
        minmax(150px, 1.3fr)
        minmax(105px, .75fr)
        minmax(90px, .65fr)
        minmax(150px, .9fr);
}


/* =========================================================
   CELLS
   ========================================================= */

.dlx-route-item__destination,
.dlx-route-item__meta,
.dlx-route-item__cta {
    display: flex;
    align-items: center;

    min-width: 0;

    padding: 0 16px;
}


/* =========================================================
   SEPARATORS
   ========================================================= */

.dlx-route-item__destination,
.dlx-route-item__meta {
    position: relative;
}

.dlx-route-item__destination::after,
.dlx-route-item__meta::after {
    content: "";

    position: absolute;
    top: 50%;
    right: 0;

    width: 1px;
    height: 24px;

    background: var(--dlx-border);

    transform: translateY(-50%);
}


/* =========================================================
   DESTINATION
   ========================================================= */

.dlx-route-item__destination {
    min-width: 0;
}

.dlx-route-item__title {
    min-width: 0;

    overflow: hidden;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   META
   ========================================================= */

.dlx-route-item__meta {
    gap: 9px;

    color: var(--dlx-muted);

    font-size: 13px;
    line-height: 1.2;

    white-space: nowrap;
}


/* =========================================================
   CTA
   ========================================================= */

.dlx-route-item__cta {
    justify-content: flex-start;

    gap: 12px;

    color: var(--dlx-accent);

    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;

    white-space: nowrap;
}


/* =========================================================
   ARROW
   ========================================================= */

.dlx-route-item__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 19px;
    line-height: 1;

    transition: transform .2s ease;
}

.dlx-route-item:hover .dlx-route-item__arrow {
    transform: translateX(3px);
}


/* =========================================================
   ICONS
   ========================================================= */

.dlx-route-item__icon {
    display: inline-flex;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    color: #8d939b;
}

.dlx-route-item__icon--pin {
    margin-right: 12px;
    color: var(--dlx-accent);
}

.dlx-route-item__icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   LOAD MORE WRAPPER
   ========================================================= */

.dlx-child-routes__more-wrap {
    display: flex;
    justify-content: center;

    margin-top: 22px;
}


/* =========================================================
   LOAD MORE BUTTON
   ========================================================= */

.dlx-child-routes-wrap button.dlx-child-routes__more {
    -webkit-appearance: none;
    appearance: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    min-width: min(100%, 420px);
    min-height: 48px;

    margin: 0;
    padding: 12px 28px;

    border: 1px solid var(--dlx-accent) !important;
    border-radius: 6px;

    background-color: transparent !important;
    background-image: none !important;

    color: #9b6928 !important;

    box-shadow: none;

    font-family: inherit;

    font-size: 13px;
    font-style: normal;
    font-weight: 600;

    letter-spacing: .04em;
    line-height: 1.2;

    text-align: center;
    text-decoration: none;
    text-shadow: none;
    text-transform: uppercase;

    cursor: pointer;

    transition:
        color .2s ease,
        background-color .2s ease,
        box-shadow .2s ease;
}

.dlx-child-routes-wrap button.dlx-child-routes__more > span {
    color: inherit !important;
    line-height: inherit;
}

.dlx-child-routes-wrap button.dlx-child-routes__more:hover,
.dlx-child-routes-wrap button.dlx-child-routes__more:focus,
.dlx-child-routes-wrap button.dlx-child-routes__more:focus-visible {
    border-color: var(--dlx-accent) !important;

    background-color: var(--dlx-accent) !important;
    background-image: none !important;

    color: #fff !important;

    box-shadow: 0 8px 22px rgba(201, 151, 79, .2);

    outline: none;
}


/* =========================================================
   LOAD MORE ICON
   ========================================================= */

.dlx-child-routes__more-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    margin: 0;
}

.dlx-child-routes__more-icon svg {
    display: block;

    width: 18px;
    height: 18px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   EMPTY
   ========================================================= */

.dlx-child-routes-empty {
    padding: 16px;

    border: 1px solid var(--dlx-border);
    border-radius: 7px;

    color: var(--dlx-muted);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1180px) {

    .dlx-child-routes,
    .dlx-child-routes--cols-2,
    .dlx-child-routes--cols-3,
    .dlx-child-routes--cols-4 {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .dlx-child-routes-section {
        padding-top: 24px;
        padding-bottom: 24px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .dlx-child-routes__title {
        font-size: 1.2rem;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .dlx-child-routes,
    .dlx-child-routes--cols-1,
    .dlx-child-routes--cols-2,
    .dlx-child-routes--cols-3,
    .dlx-child-routes--cols-4 {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .dlx-route-item {
        border-radius: 8px;
    }

    .dlx-route-item:hover {
        transform: none;
        box-shadow: 0 5px 18px rgba(20, 24, 31, .055);
    }

    /* Карточка с meta */
    .dlx-route-item__link:has(.dlx-route-item__meta) {
        display: grid;
        grid-template-columns: max-content max-content minmax(0, 1fr) 44px;
        grid-template-areas:
            "destination destination destination cta"
            "duration distance spacer cta";
        align-items: center;
        column-gap: 14px;
        row-gap: 8px;
        min-height: 78px;
        padding: 13px 14px;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) .dlx-route-item__destination {
        grid-area: destination;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) .dlx-route-item__duration {
        grid-area: duration;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) .dlx-route-item__distance {
        grid-area: distance;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) .dlx-route-item__cta {
        grid-area: cta;
        align-self: stretch;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        padding: 0;
        margin-left: 2px;
        border-left: 1px solid var(--dlx-border);
    }

    /* Карточка без meta */
    .dlx-route-item__link:not(:has(.dlx-route-item__meta)) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        align-items: center;
        min-height: 64px;
        padding: 11px 14px;
        column-gap: 12px;
    }

    .dlx-route-item__link:not(:has(.dlx-route-item__meta)) .dlx-route-item__destination {
        min-width: 0;
        padding: 0;
    }

    .dlx-route-item__link:not(:has(.dlx-route-item__meta)) .dlx-route-item__cta {
        align-self: stretch;
        justify-content: center;
        width: 44px;
        min-width: 44px;
        padding: 0;
        margin-left: 2px;
        border-left: 1px solid var(--dlx-border);
    }

    .dlx-route-item__destination,
    .dlx-route-item__meta {
        padding: 0;
    }

    .dlx-route-item__destination::after,
    .dlx-route-item__meta::after {
        display: none;
    }

    .dlx-route-item__title {
        overflow: visible;
        font-size: 15px;
        line-height: 1.3;
        text-overflow: clip;
        white-space: normal;
    }

    .dlx-route-item__meta {
        gap: 7px;
        font-size: 13px;
        line-height: 1.2;
    }

    .dlx-route-item__icon {
        flex-basis: 16px;
        width: 16px;
        height: 16px;
    }

    .dlx-route-item__icon--pin {
        margin-right: 9px;
    }

    .dlx-route-item__cta > span:first-child {
        display: none;
    }

    .dlx-route-item__arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        font-size: 18px;
        line-height: 1;
        transform: none !important;
    }

    .dlx-child-routes__more-wrap {
        margin-top: 18px;
    }

    .dlx-child-routes-wrap button.dlx-child-routes__more {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        padding: 12px 18px;
        font-size: 12px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .dlx-child-routes-section {
        padding-left: 12px;
        padding-right: 12px;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta),
    .dlx-route-item__link:not(:has(.dlx-route-item__meta)) {
        padding-left: 12px;
        padding-right: 12px;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) {
        column-gap: 10px;
    }

    .dlx-route-item__meta {
        font-size: 12.5px;
    }

    .dlx-route-item__link:has(.dlx-route-item__meta) .dlx-route-item__cta,
    .dlx-route-item__link:not(:has(.dlx-route-item__meta)) .dlx-route-item__cta {
        width: 42px;
        min-width: 42px;
    }
}