/* ===================================
   FILE UPLOAD STYLING
   =================================== */

.file-upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #3498db;
    background: #e8f4fd;
}

.file-upload-area.drag-over {
    border-color: #3498db;
    background: #e8f4fd;
    transform: scale(1.02);
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    color: #495057;
}

.file-upload-label i {
    color: #3498db;
    margin-bottom: 0.5rem;
}

.file-upload-label:hover i {
    transform: translateY(-3px);
    transition: transform 0.3s;
}

/* Selected Files Display */
.selected-files {
    margin-top: 1.5rem;
}

.selected-files h6 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.file-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: #3498db;
}

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

.file-info i {
    font-size: 1.5rem;
    color: #3498db;
}

.file-info i.fa-file-pdf {
    color: #e74c3c;
}

.file-info i.fa-file-excel {
    color: #27ae60;
}

.file-info i.fa-file-word {
    color: #2980b9;
}

.file-info i.fa-file-archive {
    color: #f39c12;
}

.file-name {
    font-weight: 500;
    color: #2c3e50;
    word-break: break-word;
}

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

.btn-remove-file {
    background: #fff;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-remove-file:hover {
    background: #e74c3c;
    color: #fff;
}

/* File Progress (for future enhancement) */
.file-progress {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.file-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease;
    animation: progressAnimation 1.5s ease-in-out infinite;
}

@keyframes progressAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* File Type Icons Colors */
.file-icon-pdf { color: #e74c3c; }
.file-icon-word { color: #2980b9; }
.file-icon-excel { color: #27ae60; }
.file-icon-zip { color: #f39c12; }
.file-icon-default { color: #95a5a6; }

/* Upload Status */
.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.upload-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.upload-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.upload-status.uploading {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Attachment Display (on blog detail) */
.attachments-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

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

.attachments-header i {
    color: #3498db;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
}

.attachment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateX(5px);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.attachment-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 1.2rem;
}

.attachment-icon.pdf {
    background: #fee;
    color: #e74c3c;
}

.attachment-icon.excel {
    background: #efe;
    color: #27ae60;
}

.attachment-icon.word {
    background: #eef;
    color: #2980b9;
}

.attachment-icon.zip {
    background: #ffeaa7;
    color: #f39c12;
}

.attachment-icon.default {
    background: #ecf0f1;
    color: #95a5a6;
}

.attachment-details {
    display: flex;
    flex-direction: column;
}

.attachment-name {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.attachment-meta {
    font-size: 0.85rem;
    color: #6c757d;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-download, .btn-preview {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download {
    background: #3498db;
    color: #fff;
}

.btn-download:hover {
    background: #2980b9;
}

.btn-preview {
    background: #fff;
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-preview:hover {
    background: #3498db;
    color: #fff;
}

/* Thumbnail Upload Specific */
.thumbnail-upload-section {
    margin-bottom: 2rem;
}

.thumbnail-preview-container {
    position: relative;
    display: inline-block;
}

.thumbnail-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.thumbnail-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.thumbnail-remove-btn:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 1.5rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .btn-remove-file {
        align-self: flex-end;
    }
    
    .attachment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .attachment-actions {
        width: 100%;
    }
    
    .btn-download, .btn-preview {
        flex: 1;
        justify-content: center;
    }
}

/* Animation for new file items */
.file-item-enter {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Drag and Drop Visual Feedback */
.file-upload-area.dragging {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #fff;
    color: #fff;
}

.file-upload-area.dragging .file-upload-label {
    color: #fff;
}

.file-upload-area.dragging i {
    color: #fff;
    animation: bounce 0.5s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}