/**
 * Dental File Upload Component Styles
 * Reusable CSS for the file upload component
 */

/* File Upload Container */
.dental-file-upload {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Upload Area */
.upload-area {
    border: 3px dashed #dee2e6;
    border-radius: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

.upload-area.uploading {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.upload-content {
    text-align: center;
    padding: 2rem;
    width: 100%;
}

.upload-icon {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.upload-area.drag-over .upload-icon {
    color: #667eea;
    transform: scale(1.1);
}

.upload-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.upload-description {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.upload-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Upload Progress Container */
.upload-progress-container {
    width: 100%;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.upload-progress-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.btn-cancel-upload {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel-upload:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.upload-progress-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.progress-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.progress-item-info {
    flex: 1;
    margin-left: 1rem;
}

.progress-item-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.progress-item-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.progress-item-status {
    margin-left: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.progress-item-status.uploading {
    color: #007bff;
}

.progress-item-status.completed {
    color: #28a745;
}

.progress-item-status.error {
    color: #dc3545;
}

.progress-bar-item {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.progress-bar-fill.completed {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.progress-bar-fill.error {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

/* File List Container */
.file-list-container {
    margin-top: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.file-list-header h4 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

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

.file-count {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-clear-all {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-clear-all:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.file-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f8f9fa;
}

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

.file-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    font-size: 1.2rem;
    color: white;
}

.file-item-icon.image {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.file-item-icon.video {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.file-item-icon.audio {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.file-item-icon.document {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.file-item-icon.archive {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.file-item-icon.cad {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

.file-item-info {
    flex: 1;
    margin-left: 1rem;
}

.file-item-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    word-break: break-word;
}

.file-item-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.file-item-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-remove-file:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* File Format Info */
.file-format-info {
    margin-top: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid #e9ecef;
}

.format-info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.format-info-header i {
    color: #667eea;
    font-size: 1.1rem;
}

.format-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.format-category {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.format-category h5 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
}

.format-category span {
    color: #6c757d;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* File validation states */
.file-item.error {
    border-left: 4px solid #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

.file-item.warning {
    border-left: 4px solid #ffc107;
    background: rgba(255, 193, 7, 0.05);
}

.file-item.success {
    border-left: 4px solid #28a745;
    background: rgba(40, 167, 69, 0.05);
}

.file-item-error {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.file-item-stored {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .upload-area {
        min-height: 250px;
    }
    
    .upload-content {
        padding: 1.5rem;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .upload-title {
        font-size: 1.25rem;
    }
    
    .file-list-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .format-categories {
        grid-template-columns: 1fr;
    }
    
    .progress-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .progress-item-status {
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-item-icon {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
    
    .file-item-info {
        margin-left: 0;
        width: 100%;
    }
    
    .file-item-actions {
        align-self: flex-end;
    }
}
