/* Mailbox Service Agreement page (modules/frontend/views/default/pages/mailbox-service-agreement.php) */

/* !important перебивает глобальный body { background: white !important } из about-us.css / difference.css */
body:has(.msa) {
    background: #f9f9f9 !important;
}

.msa {
    background: #f9f9f9;
    padding: 30px 0 78px;
    font-family: 'Inter', sans-serif;
    color: #000;
}

.msa__container {
    max-width: 1380px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1048px) 255px;
    column-gap: 27px;
    align-items: start;
}

/* Card */

/* Карточка и секции — flex-колонки, чтобы вертикальные margin'ы дочерних блоков складывались, а не схлопывались */
.msa__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 32px;
    padding: 69px 70px 29px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.03);
    min-width: 0;
}

.msa__brand {
    margin: 0 0 11px;
    font-size: 24px;
    line-height: 130%;
    font-weight: 600;
    text-transform: uppercase;
    color: #2AABEE;
}

.msa__title {
    margin: 0 0 10px;
    font-size: 40px;
    line-height: 120%;
    font-weight: 700;
    color: #2AABEE;
}

.msa__crumbs {
    margin: 0 0 30px;
    font-size: 14px;
    line-height: 150%;
    color: #2AABEE;
}

.msa__crumbs a {
    color: #2AABEE;
    text-decoration: none;
}

.msa__crumbs a:hover {
    text-decoration: underline;
}

.msa__crumbs-sep {
    opacity: 0.6;
}

.msa__intro {
    max-width: 875px;
    margin: 0 0 53px;
    font-size: 16px;
    line-height: 150%;
}

/* Sections */

.msa__section {
    display: flex;
    flex-direction: column;
    scroll-margin-top: 30px;
}

.msa__section + .msa__section {
    margin-top: 40px;
}

.msa__section--defs {
    padding-bottom: 20px;
}

.msa__head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 14px;
}

.msa__num {
    flex: 0 0 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    background: #E7F8FF;
    font-size: 28px;
    line-height: 100%;
    font-weight: 600;
    color: #2AABEE;
}

.msa__heading {
    margin: 0;
    font-size: 28px;
    line-height: 120%;
    font-weight: 600;
    color: #2AABEE;
}

.msa__body {
    max-width: 835px;
    padding-left: 60px;
    font-size: 16px;
    line-height: 150%;
}

.msa__body p {
    margin: 0;
}

.msa__body p + p {
    margin-top: 24px;
}

/* Lists */

.msa__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.msa__list li {
    position: relative;
}

.msa__list--dash li + li {
    margin-top: 24px;
}

.msa__list--dash li::before {
    content: '-';
    position: absolute;
    left: -15px;
}

/* Definitions */

.msa__defs {
    margin: 16px 0 0;
    padding: 0 64px;
    border: 1px solid #E4E4E7;
    border-radius: 20px;
}

.msa__def {
    display: grid;
    grid-template-columns: 249px minmax(0, 1fr);
    align-items: center;
    min-height: 88px;
    padding: 20px 0 20px 20px;
}

.msa__def + .msa__def {
    border-top: 1px solid #E4E4E7;
}

.msa__def-term {
    font-size: 21px;
    line-height: 130%;
    font-weight: 500;
    color: #000000;
}

.msa__def-text {
    font-size: 16px;
    line-height: 150%;
}

/* Subsections */

.msa__subs {
    margin-top: 25px;
    border-top: 1px solid #E4E4E7;
}

.msa__sub {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    padding: 20px 0;
    border-bottom: 1px solid #E4E4E7;
}

.msa__sub-num,
.msa__sub-title {
    margin: 0;
    font-size: 24px;
    line-height: 130%;
    font-weight: 600;
    color: #000000;
}

.msa__sub-num {
    padding-left: 8px;
}

.msa__sub-text {
    grid-column: 2;
    margin: 10px -12px 0 0;
    font-size: 16px;
    line-height: 150%;
}

/* Fees table */

.msa__table {
    margin-top: 35px;
    border: 1px solid #E4E4E7;
    border-radius: 20px;
    overflow: hidden;
}

.msa__table-row {
    display: grid;
    grid-template-columns: 62.8% minmax(0, 1fr);
}

.msa__table-row + .msa__table-row {
    border-top: 1px solid #E4E4E7;
}

.msa__table-cell {
    display: flex;
    align-items: center;
    padding: 25px;
    font-size: 16px;
    line-height: 150%;
}

.msa__table-cell:first-child {
    padding-right: 60px;
}

.msa__table-cell + .msa__table-cell {
    border-left: 1px solid #E4E4E7;
}

.msa__table-row--head {
    background: #FAFAFA;
}

.msa__table-row--head .msa__table-cell {
    padding: 20px 25px;
    font-size: 24px;
    line-height: 130%;
    font-weight: 600;
    color: #000000;
}

.msa__footer {
    margin: 146px 0 0;
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    color: #2AABEE;
}

/* Table of contents */

.msa__toc {
    position: sticky;
    top: 90px;
    padding: 25px 0 28px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0px 0px 20px 0px #8E8D8D1C;
    overflow: hidden;
}

.msa__toc-title {
    margin: 0 0 17px;
    padding: 0 25px;
    font-size: 24px;
    line-height: 130%;
    font-weight: 600;
    color: #000000;
}

.msa__toc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.msa__toc-list li + li {
    margin-top: 8px;
}

.msa__toc-link {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 8px 20px 9px 25px;
    font-size: 16px;
    line-height: 150%;
    color: #000000;
    text-decoration: none;
    transition: background-color 0.2s;
}

.msa__toc-link:hover {
    color: #15346d;
    background: #f3fbff;
}

.msa__toc-link.is-active {
    background: #E7F8FF;
    box-shadow: inset 2px 0 0 #2AABEE;
}

/* Responsive */

@media (max-width: 1199px) {
    .msa__container {
        padding: 0 16px;
        grid-template-columns: minmax(0, 1fr) 255px;
        column-gap: 24px;
    }

    .msa__card {
        padding: 48px 40px 29px;
    }
}

@media (max-width: 991px) {
    .msa__container {
        grid-template-columns: minmax(0, 1fr);
    }

    .msa__toc {
        display: none;
    }
}

@media (max-width: 767px) {
    .msa {
        padding: 16px 0 40px;
    }

    .msa__card {
        padding: 32px 16px 24px;
        border-radius: 20px;
    }

    .msa__brand {
        font-size: 18px;
        line-height: 130%;
        margin-bottom: 6px;
    }

    .msa__title {
        font-size: 28px;
        line-height: 120%;
    }

    .msa__intro {
        margin-bottom: 40px;
    }

    .msa__num {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .msa__heading {
        font-size: 22px;
        line-height: 120%;
    }

    .msa__body {
        padding-left: 0;
    }

    .msa__list--dash li {
        padding-left: 15px;
    }

    .msa__list--dash li::before {
        left: 0;
    }

    .msa__defs {
        padding: 0 16px;
        border-radius: 20px;
    }

    .msa__def {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 6px;
        min-height: 0;
        padding: 16px 0;
    }

    .msa__def-term {
        font-size: 18px;
        line-height: 130%;
    }

    .msa__sub {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .msa__sub-num,
    .msa__sub-title {
        font-size: 20px;
        line-height: 140%;
    }

    .msa__sub-num {
        padding-left: 0;
    }

    .msa__sub-text {
        grid-column: 1 / -1;
        margin-right: 0;
    }

    .msa__table-row {
        grid-template-columns: 55% minmax(0, 1fr);
    }

    .msa__table-cell,
    .msa__table-cell:first-child {
        padding: 14px;
        font-size: 14px;
        line-height: 140%;
    }

    .msa__table-row--head .msa__table-cell {
        padding: 12px 14px;
        font-size: 18px;
        line-height: 130%;
    }

    .msa__footer {
        margin-top: 64px;
    }
}
