/* спизжено из ЕЕдитора самим автором ЕЕдитора */
/* Контейнер списка */
.list {
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.list-container {
    /*background: var(--background-secondary);*/
    border-radius: var(--br);
    padding: 16px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-x: scroll;
    overflow-y: scroll;
    height: calc(100dvh - 2rem - 32px - 48px);
}

/* Заголовок списка */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.list-header h2 {
    margin: 0;
    /*font-size: 24px;*/
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 8px;
}

/* Таблица списка */
.list-table {
    /*width: 100%;*/
    border-collapse: collapse;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-y: scroll;
    border-radius: var(--br);
    background: linear-gradient(135deg, #2b2b2bad);
}

.list-table th,
.list-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.list-table th {
    background-color: #c7c7c721;
    font-weight: 500;
    color: #e0e0e0;
    /*font-size: 14px;*/
    user-select: none;
    position: relative;
    padding: 12px 16px;
}

.th-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.th-title {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.th-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Обновляем стили для стрелок сортировки */
.list-table th[data-sort] .th-title:after {
    content: '⇕';
    margin-left: 4px;
    opacity: 0.3;
    display: inline-block;
}

.list-table th[data-sort].sort-asc .th-title:after {
    content: '↑';
    opacity: 1;
}

.list-table th[data-sort].sort-desc .th-title:after {
    content: '↓';
    opacity: 1;
}

.list-table td {
    /*font-size: 14px;*/
    color: #e0e0e0;
}

.list-table tbody tr {
    transition: background-color 0.2s ease;
}

/* Информационная панель */
.info-container {
    background: var(--background-secondary);
    border-radius: var(--br);
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
}

.info-header h2 {
    margin: 0;
    /*font-size: 24px;*/
    font-weight: 600;
    color: var(--text-primary);
}

.info-actions {
    display: flex;
    gap: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .list {
        padding: 12px;
    }

    .list-container,
    .info-container {
        padding: 12px;
    }

    .list-header h2,
    .info-header h2 {
        /*font-size: 20px;*/
    }

    .list-table th,
    .list-table td {
        padding: 8px 12px;
        /*font-size: 13px;*/
    }
}

@media (max-width: 480px) {
    .list {
        padding: 8px;
    }

    .list-container,
    .info-container {
        padding: 8px;
    }

    .list-header h2,
    .info-header h2 {
        /*font-size: 18px;*/
    }

    .list-table th,
    .list-table td {
        padding: 6px 8px;
        /*font-size: 12px;*/
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        overflow-y: auto;
        white-space: nowrap;
        height: calc(100vh - 180px);
        margin: 0;
        padding: 0;
        position: relative;
    }

    .list-table {
        width: 100%;
    }
}

.info-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}


.info-container {
    padding: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.icon-action-button.clear {
    background-color: #666;
}

.icon-action-button.clear:hover {
    background-color: #888;
}

/* Обновляем стили для контейнера таблицы */
.table-container {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    padding-bottom: 12px;
    height: calc(100vh - 140px);
}

/* Стилизуем скроллбар для контейнера */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.list-table img {
    cursor: pointer;
}