/* EUROSPACE legacy-style price module */

#prices {
    padding: 26px 0 58px;
    background: #f5f0ec;
    scroll-margin-top: 110px;
}

.legacy-price-shell {
    color: #52291c;
}

.legacy-price-main-tabs,
.legacy-price-subtabs {
    display: flex;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
    overflow-x: auto;
    align-items: stretch;
}

.legacy-price-main-tabs {
    margin-bottom: 20px;
}

.legacy-price-tab {
    min-width: 120px;
    min-height: 54px;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    color: #52291c;
    background: #f3f3f3;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.legacy-price-subtabs .legacy-price-tab {
    flex: 0 1 auto;
}

.legacy-price-tab:hover {
    background: #e7e0dc;
}

.legacy-price-tab.is-active {
    color: #fff;
    background: #52291c;
}

.legacy-price-content {
    margin-top: 22px;
}

.legacy-price-group + .legacy-price-group {
    margin-top: 42px;
}

.legacy-price-group__title {
    margin: 0 0 16px;
    color: #52291c;
    font-size: clamp(23px, 2vw, 32px);
    line-height: 1.15;
}

.legacy-price-table {
    overflow: hidden;
    width: 100%;
    border-radius: 8px;
    background: #fff;
}

.legacy-price-header {
    display: grid;
    align-items: center;
    min-height: 98px;
    padding: 0 38px;
    color: #fff;
    background: #5a2c1e;
    font-size: clamp(18px, 1.5vw, 26px);
    font-weight: 700;
}

.legacy-price-header--language {
    grid-template-columns:
        minmax(0, 2.35fr)
        minmax(140px, .85fr)
        minmax(140px, .85fr)
        minmax(150px, .65fr);
    gap: 24px;
}

.legacy-price-header--stacked {
    grid-template-columns:
        minmax(0, 2.4fr)
        minmax(220px, .95fr)
        minmax(150px, .65fr);
    gap: 24px;
}

.legacy-price-row {
    display: grid;
    align-items: center;
    min-height: 96px;
    padding: 20px 38px;
    background: #fff;
    border-bottom: 1px solid #eee6e1;
}

.legacy-price-row:last-child {
    border-bottom: 0;
}

.legacy-price-row--language {
    grid-template-columns:
        minmax(0, 2.35fr)
        minmax(140px, .85fr)
        minmax(140px, .85fr)
        minmax(150px, .65fr);
    gap: 24px;
}

.legacy-price-row--stacked {
    grid-template-columns:
        minmax(0, 2.4fr)
        minmax(220px, .95fr)
        minmax(150px, .65fr);
    gap: 24px;
}

.legacy-price-name {
    min-width: 0;
    color: #52291c;
    font-size: clamp(17px, 1.3vw, 23px);
    line-height: 1.28;
}

.legacy-price-name__title {
    font-weight: 600;
}

.legacy-price-lines {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    color: #66544d;
    font-size: .88em;
    font-weight: 400;
}

.legacy-price-lines > div {
    min-height: 1.25em;
}

.legacy-price-value {
    color: #52291c;
    font-size: clamp(18px, 1.25vw, 23px);
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.legacy-price-value--stacked {
    display: grid;
    gap: 8px;
}

.legacy-price-value--stacked > div {
    min-height: 1.25em;
}

.legacy-price-order-cell {
    display: flex;
    justify-content: flex-end;
}

.legacy-price-order {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    min-height: 46px;
    color: #52291c;
    background: transparent;
    font-size: clamp(17px, 1.25vw, 22px);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.legacy-price-order b {
    font-size: 33px;
    font-weight: 400;
    line-height: 1;
}

.legacy-price-empty {
    padding: 28px;
    border: 1px solid #e2d7d1;
    border-radius: 8px;
    background: #fff;
    color: #66544d;
}

@media (max-width: 900px) {
    .legacy-price-header {
        min-height: 72px;
        padding-inline: 20px;
    }

    .legacy-price-row {
        padding-inline: 20px;
    }

    .legacy-price-header--language,
    .legacy-price-row--language {
        grid-template-columns:
            minmax(0, 1.8fr)
            120px
            120px
            120px;
        gap: 14px;
    }

    .legacy-price-header--stacked,
    .legacy-price-row--stacked {
        grid-template-columns:
            minmax(0, 1.8fr)
            minmax(150px, .9fr)
            120px;
        gap: 14px;
    }
}

@media (max-width: 680px) {
    .legacy-price-main-tabs,
    .legacy-price-subtabs {
        gap: 8px;
    }

    .legacy-price-tab {
        min-width: 140px;
        min-height: 46px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .legacy-price-header {
        display: none;
    }

    .legacy-price-row,
    .legacy-price-row--language,
    .legacy-price-row--stacked {
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        min-height: 0;
        padding: 18px;
    }

    .legacy-price-name {
        grid-column: 1 / -1;
        font-size: 17px;
        font-weight: 600;
    }

    .legacy-price-row--language .legacy-price-value:nth-of-type(2)::before {
        content: "На русский";
        display: block;
        margin-bottom: 4px;
        color: #8c776d;
        font-size: 12px;
        font-weight: 500;
    }

    .legacy-price-row--language .legacy-price-value:nth-of-type(3)::before {
        content: "С русского";
        display: block;
        margin-bottom: 4px;
        color: #8c776d;
        font-size: 12px;
        font-weight: 500;
    }

    .legacy-price-row--stacked .legacy-price-value {
        grid-column: 1;
    }

    .legacy-price-order-cell {
        grid-column: 2;
        align-self: end;
    }

    .legacy-price-order {
        min-height: 40px;
        font-size: 16px;
    }
}

/* ES_LEGACY_PRICE_DETAILS_LINK_V1_1 */
.legacy-price-details {
    display: inline-block;
    margin-left: 10px;
    color: inherit;
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.legacy-price-details:hover {
    text-decoration-thickness: 2px;
}

@media (max-width: 700px) {
    .legacy-price-details {
        margin-left: 7px;
        font-size: 0.8em;
    }
}

/* ES_PRICE_SERVICE_DESCRIPTION_V1 */
.legacy-price-name__description {
    margin-top: 5px;
    color: #7d6d65;
    font-size: 0.88em;
    font-weight: 400;
    line-height: 1.4;
}

.legacy-price-name__description + .legacy-price-lines {
    margin-top: 7px;
}

@media (max-width: 700px) {
    .legacy-price-name__description {
        margin-top: 4px;
        font-size: 0.84em;
        line-height: 1.35;
    }
}
