/* File List CSS */
/* Basic styles for file listing and browsing */

/* File card animation styles from template */
.file-card {
    transition: all 0.3s ease;
}

.file-card:hover {
    transform: translateY(-4px);
}

.file-list-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header section */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.list-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Search bar */
.search-bar {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
}

/* Filter and sort controls */
.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.filter-section {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-dropdown {
    position: relative;
}

.filter-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.filter-button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #3b82f6;
    border-radius: 9999px;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.sort-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #ffffff;
    cursor: pointer;
}

/* View toggle */
.view-toggle {
    display: flex;
    background-color: #f3f4f6;
    border-radius: 0.375rem;
    padding: 0.125rem;
}

.view-button {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    background: none;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.view-button.active {
    color: #1a202c;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Grid view */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.file-card {
    background: #ffffff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.file-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.thumbnail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-icon {
    width: 4rem;
    height: 4rem;
    color: #d1d5db;
}

.file-type-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 0.25rem;
    backdrop-filter: blur(4px);
}

.file-card-body {
    padding: 1rem;
}

.file-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-card-description {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.file-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.file-card-price {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

.file-card-meta {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* List view */
.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.file-list-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.list-thumbnail {
    width: 80px;
    height: 80px;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.list-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-icon {
    width: 2.5rem;
    height: 2.5rem;
    color: #d1d5db;
}

.list-content {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.list-description {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.list-price {
    font-size: 1rem;
    font-weight: 600;
    color: #1a202c;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-info {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 1rem;
}

.page-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.page-button:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.page-button:disabled {
    color: #9ca3af;
    cursor: not-allowed;
}

.page-button.active {
    color: #ffffff;
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.page-number {
    min-width: 2.5rem;
    text-align: center;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1.5rem;
    color: #e5e7eb;
}

.empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.empty-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.empty-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #ffffff;
    background-color: #3b82f6;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
}

.empty-action:hover {
    background-color: #2563eb;
}

/* Loading state */
.loading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.loading-card {
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 0.25rem;
}

.skeleton-thumbnail {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
}

.skeleton-title {
    width: 70%;
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text {
    width: 100%;
    height: 0.75rem;
    margin-bottom: 0.25rem;
}

.skeleton-text:last-child {
    width: 60%;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive design */
@media (max-width: 1024px) {
    .list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-actions {
        width: 100%;
    }

    .search-bar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .file-list-container {
        padding: 1rem;
    }

    .list-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-section {
        justify-content: space-between;
    }

    .file-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .file-grid {
        grid-template-columns: 1fr;
    }

    .file-list-item {
        flex-direction: column;
        text-align: center;
    }

    .list-content {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
    }
}