/*
 * Декоративный слой ПГЗ: фон, ленты и рабочие плоскости.
 * Слой не содержит бизнес-логики и не перехватывает события указателя.
 */

body:has(> .pgz-shell) {
    background-color: #edf3f4;
}

.pgz-shell {
    --pgz-side-space: max(4.2105263158%, calc((100% - 1800px) / 2));
    position: relative;
    box-sizing: border-box;
    width: 100%;
    background: #edf3f4;
    isolation: isolate;
    padding: 14.8958333333% var(--pgz-side-space) 4.0625%;
}

.pgz-shell [data-pgz-header] {
    position: absolute;
    z-index: 2;
    top: 42px;
    top: calc(var(--pgz-unit, 1px) * 42);
    left: var(--pgz-side-space);
    width: calc(100% - var(--pgz-side-space) * 2);
}

.pgz-shell [data-pgz-main] {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
}

.pgz-decoration {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.pgz-decoration > svg {
    display: block;
    width: 100%;
    height: 100%;
}

/*
 * Приспосабливаем существующую шапку к декоративной белой плоскости:
 * внешние отступы и фон уже задаёт слой, поэтому не дублируем их.
 */
.pgz-shell [data-pgz-header] > header {
    background: transparent;
}

.pgz-shell [data-pgz-header] .new-container {
    max-width: none;
    padding: 0;
}

.pgz-shell [data-pgz-header] .header {
    padding: 0 0 12px;
    align-items: center;
}

.pgz-shell [data-pgz-header] .header-bottom {
    background: transparent;
    border-top-color: transparent;
}

.pgz-shell [data-pgz-header] .header-nav_item {
    padding: 12px 0;
}

/*
 * Поиск занимает всё свободное место в строке шапки.
 * Если кнопки «Получить демо доступ» нет, поле расширяется ещё больше.
 */
.pgz-shell [data-pgz-header] .header-top .header-search {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: 20px;
}

.pgz-shell [data-pgz-header] .header-top .header-search .input-wrapper {
    width: 100%;
}

/*
 * В прилипшем состоянии шапка выходит из декоративной плоскости,
 * поэтому ей нужен собственный непрозрачный фон.
 */
.pgz-shell [data-pgz-header] header.sticky .header-bottom {
    background: #fff;
    border-top-color: #dce4e9;
}

@media screen and (min-width: 1400px) {
    .pgz-shell [data-pgz-header] header.sticky .header-bottom > .new-container {
        max-width: 1800px;
        padding: 0 30px;
    }
}

/*
 * Рабочая область занимает всю ширину декоративной плоскости.
 * Содержимое и так имеет безопасный отступ от скошенного нижнего угла,
 * поэтому clip-path для него не применяем.
 */
.pgz-shell > main > .new-container {
    max-width: none;
    padding: 20px;
    margin-top: 11px;
    background-color: #f5f5f5;
    margin-bottom: 25px;
}

/* Верхний отступ первой секции задаёт сама декоративная композиция. */
.pgz-shell [data-pgz-main] > :first-child {
    margin-top: 0;
}

/* Страница тарифов: React-приложение встраиваем в рабочую плоскость. */
.pgz-shell [data-pgz-main] #root > div {
    margin: -20px !important;
    padding-left: 20px !important;
    padding-right: 0 !important;
    border-radius: unset !important;
}

/*.pgz-shell .new-container {*/
/*    background-color: #fff!important;*/
/*}*/



@media screen and (max-width: 767px) {
    .pgz-shell [data-pgz-main] #root > div > .mb-8 > div {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pgz-shell [data-pgz-main] #root > div > .mb-8 > div > div:first-child {
        width: 100%;
        max-width: none;
    }

    .pgz-shell [data-pgz-main] #root > div > .mb-8 > div > div:first-child button {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pgz-shell {
        scroll-behavior: auto;
    }
}

/*
 * Ниже 1400px шапка перестаёт быть абсолютной: в одну строку
 * существующие поиск, навигация и кнопки уже не помещаются.
 */
@media screen and (max-width: 1399px) {
    .pgz-shell {
        padding: 0 var(--pgz-side-space) 4.0625%;
    }

    .pgz-shell [data-pgz-header] {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        z-index: 2;
    }

    .pgz-shell [data-pgz-header] .header {
        padding: 15px 0;
    }

    .pgz-shell [data-pgz-header] .header-bottom {
        border-top: 1px solid #dce4e9;
        padding: 8px 0;
    }

    /*
     * В статичной шапке убираем автоматические отступы между пунктами
     * и уменьшаем gap, чтобы меню не переносилось на вторую строку.
     */
    .pgz-shell [data-pgz-header] .header-nav {
        gap: 4px;
    }

    .pgz-shell [data-pgz-header] .header-nav_item:not(:first-child) {
        margin-left: 0;
    }

    .pgz-shell [data-pgz-header] header.sticky .header-bottom > .new-container {
        padding: 0 var(--pgz-side-space);
    }

    .pgz-shell > main {
        position: relative;
        z-index: 1;
        padding-top: 24px;
    }
}

@media screen and (max-width: 1279px) {
    .pgz-shell [data-pgz-header] .header-nav_link {
        font-size: 12px;
    }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
    .pgz-shell [data-pgz-header] .header-demo-btn--white,
    .pgz-shell [data-pgz-header] .header__lk .btn {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/*
 * На экранах уже 1400px декоративные плоскости шапки не совпадают
 * с высотой реального DOM, поэтому шапка получает собственный фон.
 */
@media screen and (max-width: 1399px) {
    .pgz-shell [data-pgz-header] > header {
        background: #fff;
    }
}
