.common-page {
    overflow-y: hidden;
    height: 100vh;
    position: relative;

    @media (max-width: 767px) {
        overflow-y: auto; /*прокрутка*/
        height: auto;
        min-height: 100vh;
    }
}

.common-page a {
    text-decoration: none;
}

.common-page .rules-link {
    color: var(--primary-blue);
    font-weight: 800;
}

.common-page__side {
    padding: 0 0 20px 16px;
    width: 267px;
    height: calc(100vh - 70px);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;

    @media (max-width: 991px) {
        margin-top: 20px;
        padding: 0 16px;
        width: 96px;
    }

    @media (max-width: 767px) {
        margin-top: 0;
        padding: 0 8px;
        display: none;
    }

    @media (max-width: 576px) {
    }
}

.common-page__side .common-page__header {
    display: none;
}

.common-page__menu {
    margin-top: 8px;
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;

    @media (max-width: 991px) {
        margin-top: 0;
        padding: 0 12px;
        position: relative;
    }

    @media (max-width: 767px) {
        padding: 0;
        margin-top: 12px;
    }
}

.common-page__menu-item {
    border-radius: 8px;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 120%;
    font-weight: bold;
    color: var(--neutral-navy);
    padding: 10px 12px 10px 44px;
    text-decoration: none;
    display: block;
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 20px;

    @media (max-width: 991px) {
        overflow: hidden;
        height: 40px;
        width: 40px;
        margin-bottom: 12px;
        padding: 0 0 0 40px;
    }

    @media (max-width: 767px) {
        overflow: unset;
        width: 100%;
        margin-bottom: 4px;
        padding: 10px 12px 10px 44px;
        display: block;
    }
}

.common-page__menu-item_tenders, .common-page__menu-item_tenders:hover {
    background-image: url('../image/t_tenders_a.svg');
}

.common-page__menu-item_report, .common-page__menu-item_report:hover {
    background-image: url('../image/t_report_a.svg');
}

.common-page__menu-item_support, .common-page__menu-item_support:hover {
    background-image: url('../image/t_support_a.svg');
}

.common-page__menu-item_archive, .common-page__menu-item_archive:hover {
    background-image: url('../image/t_archive_a.svg');
}

.common-page__menu-item_wins, .common-page__menu-item_wins:hover {
    background-image: url('../image/t_wins_a.svg');
}

.common-page__menu-item_message, .common-page__menu-item_message:hover {
    background-image: url('../image/t_message_a.svg');
}

.common-page__menu-item_templates, .common-page__menu-item_templates:hover {
    background-image: url('../image/t_templates_a.svg');
}

.common-page__menu-item_settings, .common-page__menu-item_settings:hover {
    background-image: url('../image/t_settings.svg');
}

.common-page__menu-item_install, .common-page__menu-item_install:hover {
    background-image: url('../image/t_install.svg');
}

#idInstallPWA {
    display: none;
}

.common-page__menu-item_active {
    background-color: var(--teclis-blue-rgba);
    color: var(--primary-blue);
}

.common-page__menu-item:hover {
    background-color: var(--neutral-light-blue);
    color: var(--neutral-navy);
}

/*боковое меню на малых экранах */

.common-page__side_active {
    z-index: 10;
    height: calc(100vh - 70px);

    @media (max-width: 767px) {
        display: block;
        position: fixed;
        background-color: var(--neutral-bg);
        height: 100vh;
        top: 0;
        width: 100%;
    }
}

.common-page__side_active .common-page__header {

    @media (max-width: 767px) {
        display: flex;
        margin-left: -8px;
        width: 100vw;
    }
}

.common-page__side_active::after {
    @media (max-width: 767px) {
        content: '';
        position: absolute;
        top: 25px;
        right: 25px;
        width: 20px;
        height: 20px;
        background: url('../image/close.svg') no-repeat center center / contain;
        cursor: pointer;
        z-index: 10;
    }
}

.common-page__main-top-menu {

    @media (max-width: 767px) {
        background: url('../image/hamburger.svg') no-repeat center / contain;
        width: 26px;
        height: 26px;
        cursor: pointer;
        position: absolute;
        left: 18px;
        top: 16px;
    }
}

/* main */

.common-page__main {
    flex-grow: 1;
    padding: 0 0 20px;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    @media (max-width: 991px) {
        padding: 0 16px 16px 0;
    }

    @media (max-width: 767px) {
        padding: 0 16px 16px;
        position: relative;
        overflow-x: auto;
        flex-grow: 1;
    }
}

/* Заголовок страницы */

.common-page__main-header {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;

    @media (max-width: 767px) {
        padding: 8px 0;
    }

    @media (max-width: 600px) {
        display: block;
    }
}

.common-page__main-header-left {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;

    @media (max-width: 767px) {
        padding: 8px 8px 8px 40px;
        vertical-align: bottom;
    }
}

.common-page__main-header-left h1 {
    color: var(--secondary-blue);

    @media (max-width: 767px) {
        font-size: 18px;
        line-height: 150%;
        margin: 0;
    }
}

/*Меню переключения между активными тендерами, заказами и архивом на странице тендеры у заказчика*/

.common-page__page-menu {
    display: flex;
    flex-wrap: nowrap;
    min-height: 72px;
    align-items: center;

    @media (max-width: 767px) {
        min-height: unset;
        display: flex;
        justify-content: flex-start;
        padding: 6px 12px 6px 40px;
    }
}

.common-page__page-menu-item {
    display: inline;
    text-wrap: nowrap;
    font-weight: bold;
    font-size: 24px;
    color: var(--jet-gray);
    text-decoration: none;
    margin-right: 24px;

    @media (max-width: 991px) {
        font-size: 24px;
    }

    @media (max-width: 767px) {
        font-size: 20px;
    }
}

.common-page__page-menu-item_active,
.common-page__page-menu-item:hover {
    color: var(--primary-blue);
}

.common-page__page-menu-item span {
    display: none; /* функция подсчета количества*/
    background-color: var(--jet-gray-rgba);
    font-weight: 900;
    border-radius: 40px;
    padding: 2px 12px;
    font-size: 16px;
    line-height: 24px;

    @media (max-width: 576px) {
        padding: 4px 8px;
        font-size: 12px;
        line-height: 12px;
    }
}

.common-page__page-menu-item_active span,
.common-page__page-menu-item:hover span {
    background-color: var(--primary-blue-rgba);
}

/*Кнопка создания тендера*/

.common-page__main-header-add {
    display: block;
    font-size: 16px;
    text-align: center;
    color: var(--neutral-white);
    background-color: var(--primary-blue);
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 265px;
    width: 100%;
    height: 40px;
    cursor: pointer;

    @media (max-width: 767px) {
        max-width: 215px;
        height: 32px;
        opacity: 1;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
    }

    @media (max-width: 600px) {
        max-width: 100%;
        margin: 10px 0;
        height: 40px;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 16px;
    }
}

.common-page__main-header-add:hover {
    color: var(--neutral-white);
    opacity: .9;
}

.common-page__tenders-list, .promo, .create-tender, .reports-page, .support-page, .common-settings, .templates-page, .setting-menu, .mess-page, .wins-page, .load-tender-page, .driver-add-page, .files-page {
    padding: 16px;
    max-height: calc(100vh - 230px);
    height: calc(100vh - 230px);
    overflow-x: hidden;
    overflow-y: auto; /* вертикальная прокрутка */
    width: 100%;
    scrollbar-width: thin;
    border-radius: 8px;

    @media (max-width: 767px) {
        padding: 8px 0;
        overflow-x: auto;
        flex-grow: 1;
        height: auto;
        max-height: unset;
    }

    @media (max-width: 576px) {
        padding: 0;
    }
}

.min-remaining-space {
    min-height: 230px;
}

/*Кнопка Уведомления о новых грузах*/
.notification-button, .notification-button:hover, .notification-button:active {
    cursor: pointer;
    text-decoration: none;
    min-width: 280px;
    height: 40px;
    background: var(--primary-blue) url('../image/notification-bing.svg') no-repeat left 12px center;
    line-height: 40px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    color: var(--neutral-white);
    margin: 0;
    white-space: nowrap;

    border-radius: 8px;
    gap: 8px;
    padding: 0 12px 0 32px;

    @media (max-width: 1466px) {
        background-position: center center;
        min-width: 40px;
        width: 40px;
        padding: 0 0 0 40px;
        overflow: hidden;
    }

    @media (max-width: 991px) {
        padding: 0 0 0 32px;
        overflow: hidden;
        height: 32px;
        width: 32px;
        min-width: 32px;
        border-radius: 6px;
        font-size: 12px;
        line-height: 32px;
    }

    @media (max-width: 767px) {
        background-position: left 12px center;
        padding: 0 12px 0 32px;
        flex-grow: 1;
        min-width: 280px;
        width: 100%;
    }

    @media (max-width: 576px) {
        background-position: center center;
        overflow: hidden;
        min-width: unset;
        height: 32px;
        width: 32px;
        padding: 0 0 0 32px;
    }
}

.common-page__pagination {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    padding: 8px 16px;

    @media (max-width: 767px) {
        margin-bottom: 10px;
        padding: 0;
    }
}

.invisible {
    position: absolute;
}

.common-page__pagination form {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;

    @media (max-width: 576px) {
        overflow: hidden;
    }
}

.common-page__pagination label {
    white-space: nowrap;
    font-weight: 600;
    font-size: 20px;
    color: var(--neutral-navy);
    margin-right: 12px;
    text-align: right;

    @media (max-width: 1280px) {
        font-size: 12px;
        line-height: 16px;
        margin-right: 6px;
    }

    @media (max-width: 480px) {
        display: none;
    }
}

.common-page__pagination select  {
    border: 1px solid var(--neutral-marble);
    border-radius: 8px;
    padding: 8px 12px;
    height: 40px;
    box-shadow: none;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
    background-repeat: no-repeat;

    @media (max-width: 1280px) {
        height: 32px;
        font-size: 12px;
        padding: 4px 3px;
        width: 48px;
    }
}
