/* ABC Luxury - Project Attachments Styles */

/* Upload Area Styles */
.upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.05);
}

.upload-area.dragover {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.1);
    transform: scale(1.02);
}

/* Attachment Card Styles */
.attachment-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.attachment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border-color: #007bff;
}

.attachment-card .card-img-top {
    position: relative;
    overflow: hidden;
}

.attachment-card .card-img-top img {
    transition: transform 0.3s ease;
}

.attachment-card:hover .card-img-top img {
    transform: scale(1.1);
}

/* Photo Gallery Styles */
.photo-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.photo-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.photo-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

.photo-actions .btn {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gallery View Modes */
.gallery-grid .photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-timeline .photo-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 30px;
}

.gallery-timeline .photo-item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #007bff;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px #007bff;
}

.gallery-masonry {
    column-count: 4;
    column-gap: 20px;
}

.gallery-masonry .photo-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Compare Mode Styles */
.compare-slot {
    min-height: 250px;
    transition: all 0.3s ease;
}

.compare-slot.active {
    border-color: #007bff !important;
    background-color: rgba(0, 123, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Progress Bar Enhancements */
.progress {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Badge Enhancements */
.badge {
    font-size: 0.75em;
    padding: 0.35em 0.65em;
    border-radius: 6px;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 15px 15px;
}

/* Button Enhancements */
.btn-action-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-action-circle:hover {
    transform: scale(1.1);
    color: white;
}

/* File Type Icons */
.file-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-icon.pdf { color: #dc3545; }
.file-icon.doc { color: #007bff; }
.file-icon.xls { color: #28a745; }
.file-icon.image { color: #6f42c1; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gallery-grid .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-masonry {
        column-count: 2;
    }
    
    .photo-card {
        height: 250px !important;
    }
    
    .attachment-card .card-img-top {
        height: 150px !important;
    }
}

@media (max-width: 576px) {
    .gallery-grid .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-masonry {
        column-count: 1;
    }
    
    .compare-slot {
        min-height: 200px;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Project Attachments Counters */
.btn.position-relative .badge {
    font-size: 0.65em;
    min-width: 18px;
    height: 18px;
    line-height: 1.2;
    border: 2px solid white;
}

.btn-outline-primary .badge.bg-primary {
    background-color: var(--bs-primary) !important;
}

.btn-outline-info .badge.bg-info {
    background-color: var(--bs-info) !important;
}

/* Attachment info in project cards */
.project-item .text-muted i {
    opacity: 0.7;
}

.project-item .badge.smaller {
    font-size: 0.7em;
    padding: 0.25em 0.5em;
}
/* Folder Management Styles */
.folder-item {
    transition: all 0.2s ease;
}

.folder-item:hover {
    background-color: #f8f9fa !important;
}

.folder-item:hover .folder-actions {
    display: block !important;
}

.folder-item.selected {
    background-color: #0d6efd !important;
    color: white !important;
}

.folder-name {
    font-weight: 500;
    user-select: none;
}

.expand-icon {
    transition: transform 0.2s ease;
    cursor: pointer;
    width: 12px;
    text-align: center;
}

.expand-icon.fa-chevron-down {
    transform: rotate(90deg);
}

.cursor-pointer {
    cursor: pointer;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
}

/* File Preview Styles */
#previewContent {
    min-height: 500px;
    background: #f8f9fa;
}

#previewContent img {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#previewContent iframe {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Folder Tree Styles */
#folderTree {
    font-size: 0.9rem;
}

#folderTree .folder-item {
    border-radius: 4px;
    margin-bottom: 2px;
}

#folderTree .badge {
    font-size: 0.7rem;
}

/* Enhanced File Cards */
.attachment-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.attachment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Drag and Drop Styles */
.drop-zone {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.drop-zone.drag-over {
    border-color: #0d6efd;
    background: #e7f3ff;
    transform: scale(1.02);
}

.drop-zone i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Advanced Search Panel */
#advancedSearchPanel {
    border-left: 4px solid #0d6efd;
}

#advancedSearchPanel .form-label {
    color: #495057;
    font-weight: 600;
}

/* Search Results */
#searchSummary {
    border-left: 4px solid #17a2b8;
    background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .folder-tree-container {
        margin-bottom: 1rem;
    }
    
    #folderTree {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .folder-actions {
        display: block !important;
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File Type Icons */
.file-icon-pdf { color: #dc3545; }
.file-icon-doc { color: #0d6efd; }
.file-icon-xls { color: #198754; }
.file-icon-img { color: #fd7e14; }
.file-icon-default { color: #6c757d; }

/* Breadcrumb Navigation */
.folder-breadcrumb {
    background: #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.folder-breadcrumb a {
    color: #0d6efd;
    text-decoration: none;
}

.folder-breadcrumb a:hover {
    text-decoration: underline;
}

/* Context Menu */
.context-menu {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 150px;
}

.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.context-menu-item:hover {
    background: #f8f9fa;
}

.context-menu-item:last-child {
    border-bottom: none;
}

/* Progress Indicators */
.upload-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #198754);
    transition: width 0.3s ease;
}