.scheme_body {
    margin-top: -26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #333333;
    color: #ffffff;
}

.scheme {
    max-width: 1800px;
    width: 100%;
    background-color: #525252;
    color: #ffffff;
    position: relative;
}

.data {
    width: 100%;
    min-height: 200px;
    background-color: #525252;
}

.data h1 {
    font-size: 24px;
    margin-bottom: 10px;
    text-align-last: center;
}

.panel_top {
    display: flex;
    justify-content: center;
}


.panel_top button {
    width: max-content;
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 0.2rem;
    cursor: pointer;
    border-radius: 4px;
}

.panel_top button:hover {
    background-color: #45a049;
}

.group_item,
.header_caption,
.search_item {
    display: flex;
    flex-direction: row;
    padding: 3px;
    margin-bottom: 3px;
    margin-left: 3px;
    margin-right: 3px;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, .3);
    cursor: pointer;
}

.group_item {
    align-items: anchor-center;
}

.material_count {
    display: flex;
    align-items: anchor-center;
    color: #ccc;
    font-style: italic;
    font-size: 14px;
    margin-right: 10px;
    margin-left: auto;
}

.material_count::before {
    content: '';
    display: block;
    /* position: relative;
    top: 0;
    left: 0; */
    width: 30px;
    height: 30px;
    -webkit-mask-image: url(/core/images/svg/product-item-transaction.svg);
    mask-image: url(/core/images/svg/product-item-transaction.svg);
    -webkit-mask-size: 25px auto;
    mask-size: 25px auto;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: currentColor;
}

.header_caption {
    cursor: default;
    box-shadow: none;
    margin-left: auto;
}

.group_item svg,
.header_caption svg,
.search_item svg {
    width: 40px;
    height: auto;
}

.group_item p,
.header_caption p {
    padding: 3px;
    padding-left: 10px;
    font-size: large;
}

.group_item:hover,
.search_item:hover {
    background-color: #4CAF50;
}
/* Стили для модального окна выбора схемы */
#scheme_selectModal .modal-content {
    max-width: 500px;
    padding: 20px;
}

#scheme_selectModal .group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#scheme_selectModal .group label {
    margin-right: 10px;
    white-space: nowrap;
}

#scheme_selectModal .group select {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
}

#scheme_selectModal .modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#scheme_selectModal .modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

#scheme_selectModal .modal-buttons .btn {
    background-color: #4CAF50;
    color: white;
}

#scheme_selectModal .modal-buttons .btn-secondary {
    background-color: #6c757d;
    color: white;
}

#scheme_selectModal .modal-buttons button:hover {
    opacity: 0.9;
}
#scheme_selectModal .modal-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c757d;
}
#scheme_selectModal .modal-buttons .btn:disabled {
    background-color: #4CAF50;
    opacity: 0.5;
}
/* Стили для строки с label и select */
#scheme_selectModal .group-row {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

#scheme_selectModal .group-row label {
    margin-right: 10px;
    white-space: nowrap;
    font-weight: bold;
}

#scheme_selectModal .group-row select {
    flex: 1;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #333;
    font-size: 1rem;
    min-width: 200px;
}
/* Стили для списка групп в модальном окне */
#scheme_selectModal .group-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
    margin-top: 10px;
}

#scheme_selectModal .group_item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    cursor: pointer;
    color: #333;
}

#scheme_selectModal .group_item:hover {
    background-color: #e9e9e9;
}

#scheme_selectModal .group_item.selected {
    background-color: #4CAF50;
    color: white;
    border-color: #45a049;
}

#scheme_selectModal .group_item svg {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    flex-shrink: 0;
}

#scheme_selectModal .group_item p {
    margin: 0;
    font-size: 1rem;
    flex-grow: 1;
}

/* Адаптация group-row для нового списка */
#scheme_selectModal .group-row {
    display: block;
    margin-bottom: 20px;
}

#scheme_selectModal .group-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}
/* Стили для select с иконкой */
.select-with-icon {
    position: relative;
    display: inline-block;
    width: 100%;
}

.select-with-icon select {
    padding-left: 40px; /* место для иконки */
    height: 40px;
    width: 100%;
    box-sizing: border-box;
}

.select-with-icon .select-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-with-icon .select-icon svg {
    width: 100%;
    height: 100%;
}
/* Стили для кастомного combobox */
.custom-combobox {
    position: relative;
    width: 100%;
}

.combobox-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    text-align: left;
    font-size: 1rem;
    color: #333;
    box-sizing: border-box;
}

.combobox-toggle:hover {
    border-color: #888;
}

.combobox-toggle:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.selected-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.selected-icon svg {
    width: 100%;
    height: 100%;
}

.selected-text {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arrow {
    margin-left: 8px;
    font-size: 0.8em;
    color: #666;
}

.combobox-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.combobox-options {
    padding: 4px 0;
}

.combobox-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.combobox-option:hover {
    background-color: #f0f0f0;
}

.combobox-option.selected {
    background-color: #4CAF50;
    color: white;
}

.combobox-option svg {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.combobox-option span {
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Исправление цветов combobox */
.combobox-option {
    color: #333 !important;
}

.combobox-option:hover {
    background-color: #4CAF50 !important;
    color: white !important;
}

.combobox-option.selected {
    background-color: #4CAF50 !important;
    color: white !important;
}
/* Синий hover для combobox */
.combobox-option:hover {
    background-color: #007bff !important;
    color: white !important;
}

.header_group {
    background-color: #525252;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

.file_item,
.article_item {
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
    background-color: #888;
}

.file_item:hover,
.article_item:hover {
    background-color: #45a049;
    color: #ffffff;
}

.data_content {
    padding: 4px;
}

.file_item img,
.article_item img {
    width: 40px;
    height: auto;
}

.file_item a {
    margin-right: 4px;
    margin-left: auto;
    background-color: #4CAF50;
    border-radius: 6px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file_item a:hover {
    background-color: #007bff;
}

.file_item a img {
    width: 28px;
    height: auto;
}

.file_data {
    padding-left: 4px;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.file_data div {
    margin-left: 10px;
}

.article_data {
    padding-left: 4px;
    padding-right: 4px;
}

.f_description,
.a_description,
.ar_description {
    color: #ccc;
    font-style: italic;
    font-size: 13px;
}

.a_moderate {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
    margin-right: 4px;
    margin-left: auto;
}

.a_moderate img {
    width: 24px;
    height: 24px;
}

.autor_data {
    display: flex;
    flex-direction: row;
    justify-content: center;
    font-style: italic;
    color: #333333;
    font-size: 13px;
}

.autor_data div {
    margin-right: 12px;
}

.autor_data span {
    font-style: normal;
    color: #ccc;
}

.article_header {
    padding-top: 10px;
    padding-bottom: 10px;
}

.ar_autor {
    padding-top: 6px;
    display: flex;
    flex-direction: row;
    font-size: 13px;
    font-style: italic;
    color: #ccc;
}

.ar_autor div {
    margin-right: 12px;
}

.ar_autor span {
    font-style: normal;
    color: #4CAF50;
}

.article_body {
    width: 100%;
    min-height: 200px;
    background-color: #ddd;
    color: #333333;
}

.article_content {
    margin: 4px 10px;
}

.query_data {
    padding: 6px;
    font-style: italic;
    color: #ccc;
}

.query_data span {
    margin-left: 10px;
    font-style: normal;
    font-size: 18px;
    color: #ffffff;
}


/* Мобильная адаптация */
@media screen and (max-width: 768px) {
    .scheme_body {
        margin-top: -2px;
    }
}