/**
 * Fluent Boards Unlimited Upload Modal Styles
 * استایل‌های مودال آپلود نامحدود
 */

/* Modal Overlay */
.unlimited-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.unlimited-upload-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.unlimited-upload-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Modal Header */
.unlimited-upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e5e9;
    background: #f8f9fa;
}

.unlimited-upload-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.unlimited-upload-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.unlimited-upload-modal-close:hover {
    background: #e1e5e9;
    color: #1d2327;
}

/* Modal Body */
.unlimited-upload-modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Upload Area */
.unlimited-upload-area {
    border: 2px dashed #c3c4c7;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
    margin-bottom: 20px;
}

.unlimited-upload-area:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.unlimited-upload-area.dragover {
    border-color: #0073aa;
    background: #e6f3ff;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 16px;
    color: #646970;
}

.upload-icon svg {
    width: 64px;
    height: 64px;
}

.upload-text {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px 0;
}

.upload-subtext {
    font-size: 14px;
    color: #646970;
    margin: 0 0 20px 0;
}

.upload-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

/* Progress Bar */
.progress-container {
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

#unlimited-progress-text {
    text-align: center;
    font-size: 14px;
    color: #646970;
    margin: 0;
}

/* Upload Results */
.upload-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.upload-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
}

.success-icon, .error-icon {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.success-icon {
    color: #155724;
}

.error-icon {
    color: #721c24;
}

.upload-success h4, .upload-error h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.upload-success h4 {
    color: #155724;
}

.upload-error h4 {
    color: #721c24;
}

.upload-success p, .upload-error p {
    margin: 0;
    font-size: 14px;
}

/* Uploaded Files */
.uploaded-files {
    margin-top: 16px;
}

.uploaded-files h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #1d2327;
}

.uploaded-files ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uploaded-file {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-info {
    flex: 1;
}

.file-info strong {
    display: block;
    font-size: 14px;
    color: #1d2327;
    margin-bottom: 4px;
}

.file-size {
    font-size: 12px;
    color: #646970;
}

.file-actions .button {
    padding: 6px 12px;
    font-size: 12px;
    margin-left: 8px;
}

/* Upload Info */
.upload-info {
    background: #f0f8ff;
    border: 1px solid #c3d9ff;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.upload-info p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #1d2327;
}

.upload-info p:last-child {
    margin-bottom: 0;
}

.upload-info strong {
    color: #0073aa;
}

/* Modal Footer */
.unlimited-upload-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e1e5e9;
    background: #f8f9fa;
    text-align: right;
}

.unlimited-upload-modal-footer .button {
    padding: 8px 16px;
    font-size: 14px;
}

/* Body class when modal is open */
body.unlimited-upload-modal-open {
    overflow: hidden;
}

/* RTL Support */
[dir="rtl"] .unlimited-upload-modal-header {
    text-align: right;
}

[dir="rtl"] .unlimited-upload-modal-footer {
    text-align: left;
}

[dir="rtl"] .uploaded-file {
    flex-direction: row-reverse;
}

[dir="rtl"] .file-actions .button {
    margin-left: 0;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .unlimited-upload-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .unlimited-upload-modal-body {
        padding: 16px;
    }
    
    .unlimited-upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon svg {
        width: 48px;
        height: 48px;
    }
    
    .upload-text {
        font-size: 16px;
    }
    
    .uploaded-file {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-actions {
        align-self: flex-end;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .unlimited-upload-modal-content {
        background: #1d2327;
        color: #f0f0f1;
    }
    
    .unlimited-upload-modal-header {
        background: #2c3338;
        border-bottom-color: #3c434a;
    }
    
    .unlimited-upload-modal-header h3 {
        color: #f0f0f1;
    }
    
    .unlimited-upload-area {
        background: #2c3338;
        border-color: #3c434a;
    }
    
    .upload-text {
        color: #f0f0f1;
    }
    
    .uploaded-file {
        background: #2c3338;
        border-color: #3c434a;
    }
    
    .upload-info {
        background: #1e3a5f;
        border-color: #2c5aa0;
    }
    
    .unlimited-upload-modal-footer {
        background: #2c3338;
        border-top-color: #3c434a;
    }
}
