html {
    --overlay-width-narrow: clamp(200px, 50vw, 300px);
    --overlay-width: clamp(300px, 90vw, 500px);
    --overlay-width-wide: clamp(300px, 90vw, 800px);
    --overlay-width-ext-wide: clamp(300px, 90vw, 1200px);
    --base-header-height: 71px;
    --label-height: 17px;
    --grid-min-height: 210px;
    --grid-min-height-with-filter: 250px;
}

.body-frame {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100vw;
    background-color: var(--wpcard-background);
}

.resize-container {
    padding: var(--double-offset);
    min-height: 0;
}

.footer-period {
    flex: 0 0 25px;
    background-color: var(--footer-background);
    border-top: 1px solid var(--footer-border);
    padding: var(--min-offset) var(--double-offset);
    font-weight: bold;
}

.main-frame-auth {
    flex: 1 1 50px;
    overflow-y: auto;
}

/*отступы между элементами тулбара*/
.toolbar-items .card-row {
    gap: var(--double-offset);
}

/*оступ кнопок модальных окон*/
.buttons-section-class {
    padding-top: calc(var(--double-offset) * 2);
    box-sizing: border-box;
}

.buttons-section-class.first-full-width cell-switcher:first-child {
    flex-grow: 1;
}

/*заголовки тулбаров*/
.cell-item.toolbar-label .custom-content-container h3 {
    margin: 0;
    margin-right: var(--double-offset);
    margin-left: var(--double-offset);
}

/*ширина фильтра*/
.cell-item.card-block.cell-filter {
    width: 300px;
}

.scrollable-section {
    max-height: calc(95vh - 300px);
    overflow: auto;
}

/*фиксы модальныых окон*/
.my-overlay-backdrop .my-overlay-container-with-backdrop {
    padding: var(--tripple-offset);
    border-radius: var(--min-offset);
    width: unset;
}
.my-overlay-backdrop .my-overlay-container-with-backdrop .i-container-header-button {
    top: 25px !important;
    right: 20px !important;
}
.default-modal {
    width: 450px !important;
    max-width: 90vw;
    box-sizing: border-box;
}
.wide-modal {
    width: 1200px !important;
    max-width: 90vw;
    box-sizing: border-box;
}
/*-----------------------*/

/*чтобы убрать лишние отступы*/
.custom-content-container {
    padding: 0 !important;
}

cell-button {
    margin: 0 !important;
    padding: 0 !important;
}

.cell-grid .i-input-block {
    display: block;
}

.cell-grid label {
    display: none;
}
/*-----------------------*/

.audit-list {
    max-height: calc(100vh - 230px);
}

.my-overlay-backdrop div.my-overlay-container-with-backdrop.audit-model {
    width: 90vw;
}

.my-overlay-backdrop div.my-overlay-container-with-backdrop.manual-input-model,
.my-overlay-backdrop div.my-overlay-container-with-backdrop.transfer-closing-modal,
.my-overlay-backdrop div.my-overlay-container-with-backdrop.elements-searching-modal,
.my-overlay-backdrop div.my-overlay-container-with-backdrop.element-templates-searching-modal {
    width: 90vw;
    height: 90vh;
}

.audit-list-section {
    max-height: calc(100vh - 200px);
    overflow: hidden;
}

.manual-input-model .card-grid,
.elements-searching-modal .card-grid,
.element-templates-searching-modal .card-grid,
.product-selector-modal .card-grid {
    grid-template-rows: min-content auto min-content;
}

.transfer-closing-modal .card-grid{
    grid-template-rows: min-content 40% auto min-content;
}

.grid-section {
    overflow: auto;
}
.grid-section .card-row {
    height: 100%;
}
.grid-section .card-row cell-switcher {
    width: 100%;
    height: 100%;
}

.copyright-alignment {
    align-content: center;
}
.copyright-alignment .card-row {
    height: 100%;
}
.copyright-alignment div cell-switcher cell-field div:first-child {
    align-items: center;
}

.i-grid-container .i-grid .ag-cell.editable {
    border-color: var(--editable-cell);
}

.i-grid-container .i-grid .ag-cell.edited {
    border-color: var(--edited-cell);
}

.i-grid-container .i-grid .ag-cell.failed {
    border-color: var(--failed-cell);
}

.i-grid-container .ag-row .ag-cell.ag-cell-focus.failed {
    --grid-cell-focused-border: var(--failed-cell);
}

/*todo: убрать как добавят в лоукоде*/
.i-checkbox-container i-switch .i-switch .i-switch-container {
    margin: 0;
}
i-switch + label {
    margin-left: var(--min-offset);
    line-height: var(--min-line-height);
}

.section_in-tab-padding {
    padding: var(--double-offset);
    padding-bottom: 2px;
}

.web-admin-sync-button .i-button {
    width: 160px;
}

.card_with-toolbar > .lm-card-container > .card-grid {
    grid-template-rows: min-content auto;
}

.web-admin-sync-status {
    white-space: normal;
}

.cell-item.cell-style, cell-switcher:has(.cell-item.cell-style), .card-row:has(.cell-item.cell-style) {
    height: 100%;
    flex-basis: 100%;
}

.section_full-height > .card-row,
.section_full-height > .card-row > cell-switcher:last-child,
.section_full-height > .card-row > cell-switcher:last-child > .cell-item {
    height: 100%;
}

.card_grid-auto-rows > .lm-card-container > .card-grid {
    grid-auto-rows: min-content;
}

.cell_grid-no-label label {
    display: none;
}

.cell-item.cell_grid-no-label.grid-no-label .i-input-block label + grid-view {
    height: 100% !important;
    flex: 0 0 100%;
}

.section_full-width > .card-row {
    width: 100%;
}

.section_full-width > .card-row > cell-switcher {
    width: 100%;
}

.park-data-card > .lm-card-container > .card-grid {
    grid-template-rows: min-content auto min-content auto;
}

i-lm-card.park-structure-card > .lm-card-container > .card-grid {
    grid-template-rows: min-content auto;
    gap: 0;
}

.park-structure-card {
    border: var(--grid-body-border);
    border-radius: var(--grid-body-border-radius);
}

.section_park-structure-header {
    padding: var(--double-offset);
    background: var(--grid-main-background);
    border-bottom: 1px solid var(--n300);
}

.list-tree_panel tree-view {
    --grid-body-border: none;
    --grid-body-border-radius: 0;
    --tree-body-background: var(--grid-row-even);
}

.section_sync-log {
    overflow: auto;
}
.section_sync-log .card-row {
    height: 100%;
}
.section_sync-log cell-switcher:nth-child(2) {
    height: 100%;
    min-height: 0;
}

.cell_code-editor {
    height: 100%;
}

i-lm-code-editor .code-editor-toolbar-button {
    display: none;
}

i-code-editor {
    border: var(--code-editor-toolbar-border);
    border-radius: var(--min-offset);
    box-sizing: border-box;
    overflow: hidden;
    background: var(--code-editor-background);
}

.custom-cell-full-height {
    height: 100%;
}

.section_full-width.section_searching-toolbar-2 cell-switcher:nth-last-child(-n+2) {
    width: fit-content;
}
.section_full-width.section_searching-toolbar-1 cell-switcher:last-child {
    width: fit-content;
}

.accent-table-cell {
    background-color: var(--grid-cell-range-selection-background-color);
    border: 1px solid var(--grid-cell-range-selection-background-color);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
}

.list_config-objects .i-grid-container .i-grid .i-footer {
    height: 80px !important;
    padding: 5px 10px;
    gap: 5px;
    height: unset !important;
    min-height: unset;
    flex-wrap: wrap;
}

.list_config-objects .i-grid-container .i-grid .i-footer .i-pagination {
    flex-grow: 1;
    align-items: flex-end;
}

.list_config-objects .i-grid-container .i-grid .i-footer .i-legend-container {
    flex-wrap: wrap;
    justify-content: flex-end;
}