/* /var/www/xstartx.ru/www/static/file_exchange/css/file_exchange.css */

/* Общие стили для страниц файлового обмена */
.file-exchange-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Карточки файлов */
.file-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.file-card .file-icon {
    font-size: 3rem;
    padding: 20px 0 10px;
    text-align: center;
    color: #6c757d;
}

.file-card .file-body {
    padding: 15px 20px 20px;
    flex: 1;
}

.file-card .file-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-card .file-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;  /* ✅ Добавлено стандартное свойство */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-card .file-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #a0aec0;
    padding-top: 10px;
    border-top: 1px solid #edf2f7;
}

.file-card .file-actions {
    padding: 15px 20px;
    border-top: 1px solid #edf2f7;
    background: #f7fafc;
    border-radius: 0 0 12px 12px;
}

.file-card .file-actions .btn {
    width: 100%;
}

/* Категории */
.category-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.category-general { background: #e2e8f0; color: #4a5568; }
.category-documentation { background: #bee3f8; color: #2b6cb0; }
.category-software { background: #c6f6d5; color: #276749; }
.category-templates { background: #fefcbf; color: #975a16; }
.category-other { background: #fed7d7; color: #9b2c2c; }

/* Панель поиска и фильтров */
.search-filter-panel {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.search-filter-panel .form-control,
.search-filter-panel .form-select {
    border-radius: 8px;
}

.search-filter-panel .btn {
    border-radius: 8px;
    padding: 8px 24px;
}

/* Статистика файлов */
.file-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.file-stats .stat-item {
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-stats .stat-item .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.file-stats .stat-item .stat-label {
    color: #718096;
    font-size: 0.9rem;
}

/* Список файлов (для приватных) */
.file-list-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.file-list-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.file-list-item .file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.file-list-item .file-info .file-icon-small {
    font-size: 1.5rem;
    color: #4a5568;
}

.file-list-item .file-info .file-details .file-name {
    font-weight: 500;
    color: #2d3748;
}

.file-list-item .file-info .file-details .file-meta-info {
    font-size: 0.8rem;
    color: #a0aec0;
}

.file-list-item .file-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.file-list-item .file-status.status-sent { background: #e2e8f0; color: #4a5568; }
.file-list-item .file-status.status-received { background: #bee3f8; color: #2b6cb0; }
.file-list-item .file-status.status-read { background: #c6f6d5; color: #276749; }
.file-list-item .file-status.status-archived { background: #fefcbf; color: #975a16; }

.file-list-item .file-actions-list {
    display: flex;
    gap: 8px;
}

/* Загрузка файлов (drag & drop) */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s;
    background: #f7fafc;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4299e1;
    background: #ebf8ff;
}

.upload-area .upload-icon {
    font-size: 3rem;
    color: #a0aec0;
    margin-bottom: 15px;
}

.upload-area .upload-text {
    color: #4a5568;
    font-size: 1.1rem;
}

.upload-area .upload-hint {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .file-stats {
        gap: 10px;
    }
    
    .file-stats .stat-item {
        padding: 8px 15px;
    }
    
    .file-list-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-list-item .file-info {
        min-width: auto;
    }
    
    .file-list-item .file-actions-list {
        justify-content: flex-end;
    }
}
 
