/* Custom styles for Foldr File Manager */

/* File item animations */
.file-item {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

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

.file-item.selected {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Drag and drop styles */
.drag-over {
    border: 2px dashed #3b82f6 !important;
    background-color: #dbeafe !important;
}

.dragging {
    opacity: 0.5;
}

/* Context menu animations */
.context-menu {
    animation: contextMenuFadeIn 0.15s ease-out;
}

@keyframes contextMenuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal animations */
.modal-backdrop {
    animation: backdropFadeIn 0.2s ease-out;
}

@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* File type icons */
.file-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin: 0 auto 8px;
}

.file-icon.image {
    background-color: #fef3c7;
    color: #d97706;
}

.file-icon.document {
    background-color: #dbeafe;
    color: #2563eb;
}

.file-icon.video {
    background-color: #fce7f3;
    color: #db2777;
}

.file-icon.audio {
    background-color: #dcfce7;
    color: #16a34a;
}

.file-icon.archive {
    background-color: #e7e5e4;
    color: #78716c;
}

.file-icon.folder {
    background-color: #fef3c7;
    color: #d97706;
}

.file-icon.other {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Breadcrumb */
.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.breadcrumb-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #9ca3af;
}

/* Upload progress */
.upload-progress {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
}

/* Thumbnail styles */
.file-thumbnail {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* List view styles */
.list-view .file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 2px;
}

.list-view .file-icon {
    width: 32px;
    height: 32px;
    margin: 0 12px 0 0;
    flex-shrink: 0;
}

.list-view .file-name {
    flex: 1;
    min-width: 0;
    margin-right: 16px;
}

.list-view .file-size {
    width: 80px;
    text-align: right;
    margin-right: 16px;
}

.list-view .file-date {
    width: 120px;
    text-align: right;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.sort-controls {
    display: flex;
    align-items: center;
}

 #file-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

/* Responsive styles */
@media (max-width: 1024px) {

}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
}

@media (max-width: 640px) {
    .w-1\/4 {
        width: 100%;
        height: 200px;
    }

    .w-3\/4 {
        width: 100%;
    }
    .btn-header button span:nth-child(1) {
        margin:0;
    }
    .btn-header-text {
        display: none;
    }
}
