/**
 * UT Route block.
 *
 * The timeline keeps one semantic ordered list. CSS columns are used only on
 * wide screens so reading order remains top-to-bottom in the first column and
 * then continues in the second.
 */
.ut-route,
.ut-route * {
    box-sizing: border-box;
}

.ut-route {
    display: flex;
    align-items: stretch;
    gap: 48px;
    width: 100%;
    padding: 32px;
    overflow: hidden;
    color: rgba(5, 7, 69, 0.9);
    background: #fff;
    border: 1px solid #e7edfa;
    border-radius: 24px;
    font-family: Poppins, Arial, sans-serif;
}

.ut-route__summary {
    display: flex;
    flex: 0 0 240px;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ut-route__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.ut-route__type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    background: #050745;
    border-radius: 12px;
}

.ut-route__type-icon img,
.post-content .ut-route__type-icon img {
    display: block;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    object-fit: contain;
}

/* The theme expands article images to 100% on mobile. The more specific
 * article selector keeps fact icons at their authored size in that context. */
.ut-route__fact img,
.post-content .ut-route__fact img {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    max-width: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    object-fit: contain;
}

.ut-route__heading,
.ut-route__station-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ut-route__title,
.ut-route__subtitle {
    margin: 0;
}

.ut-route__title {
    color: rgba(5, 7, 69, 0.9);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
}

.ut-route__subtitle {
    margin-top: 2px;
    color: rgba(5, 7, 69, 0.7);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.ut-route__facts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ut-route__fact {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: rgba(5, 7, 69, 0.7);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
}

.ut-route__fact span {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.ut-route__divider {
    flex: 0 0 1px;
    align-self: stretch;
    background: #e7edfa;
}

.ut-route__timeline {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ut-route--two-columns .ut-route__timeline {
    column-count: 2;
    column-gap: 48px;
}

.ut-route__station {
    position: relative;
    display: flex;
    gap: 16px;
    width: 100%;
    break-inside: avoid;
}

.ut-route__station:not(.is-first)::before {
    position: absolute;
    top: 0;
    left: 11px;
    width: 2px;
    height: 6px;
    content: "";
    background: #cfdbf4;
}

.ut-route__station::after {
    position: absolute;
    top: 30px;
    bottom: 0;
    left: 11px;
    width: 2px;
    content: "";
    background: #cfdbf4;
}

.ut-route__station.is-last::after {
    display: none;
}

.ut-route__marker {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 0 0 24px;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-top: 6px;
    color: #ca641a;
    background: #fff;
    border: 2px solid #fc7d21;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
}

.ut-route__station.is-first .ut-route__marker,
.ut-route__station.is-last .ut-route__marker {
    color: #050745;
    background: #fc7d21;
}

.ut-route__station-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 6px 0 20px;
}

.ut-route__station.is-last .ut-route__station-copy {
    padding-bottom: 0;
}

.ut-route__station-name {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
}

.ut-route__station.is-first .ut-route__station-name,
.ut-route__station.is-last .ut-route__station-name {
    font-weight: 600;
}

.ut-route__station-info {
    color: rgba(5, 7, 69, 0.7);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.ut-route-editor__station-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.ut-route-editor__station {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 24px;
    gap: 6px;
    align-items: start;
}

.ut-route-editor__station-handle {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    padding-top: 26px;
    color: #757575;
    cursor: grab;
}

.ut-route-editor__station-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #050745;
    background: #e7edfa;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
}

.ut-route-editor__station-fields {
    min-width: 0;
}

.ut-route-editor__station-fields .components-base-control {
    margin-bottom: 8px;
}

.ut-route-editor__station-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-top: 22px;
}

.ut-route-editor__count {
    display: flex;
    justify-content: space-between;
    margin: 4px 0 12px;
    color: #757575;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ut-route-editor__limit {
    margin: 8px 0 0;
    color: #757575;
    font-size: 12px;
    line-height: 18px;
}

@media (max-width: 800px) {
    .ut-route {
        flex-direction: column;
        gap: 24px;
        padding: 20px 16px;
        border-radius: 16px;
    }

    .ut-route__summary {
        flex-basis: auto;
        width: 100%;
    }

    .ut-route__head {
        flex-direction: row;
        align-items: center;
    }

    .ut-route__title {
        font-size: 18px;
        line-height: 26px;
    }

    .ut-route__facts {
        flex-flow: row wrap;
        gap: 8px 16px;
    }

    .ut-route__fact {
        gap: 8px;
    }

    .ut-route__divider {
        display: none;
    }

    .ut-route--two-columns .ut-route__timeline {
        column-count: 1;
    }

    .ut-route--compact-mobile .ut-route__station-copy {
        padding-bottom: 10px;
    }

    .ut-route--compact-mobile .ut-route__station.is-last .ut-route__station-copy {
        padding-bottom: 0;
    }
}
