/**
 * 企业级头像上传组件样式
 * 提供专业的上传交互体验
 */

/* 上传进度模态框 */
.avatar-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.avatar-upload-modal.show {
    opacity: 1;
    visibility: visible;
}

.upload-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    width: 400px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.avatar-upload-modal.show .upload-container {
    transform: scale(1);
}

/* 头部关闭按钮 */
.upload-header {
    position: relative;
    height: 20px;
    margin-bottom: 10px;
}

.upload-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.upload-close:hover {
    background: #e9ecef;
    color: #333;
    transform: scale(1.1);
}

/* 上传状态显示 */
.upload-status {
    text-align: center;
    margin-bottom: 20px;
}

.upload-status-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    color: white;
}

.upload-status-icon.uploading {
    background: linear-gradient(45deg, #667eea, #764ba2);
    animation: pulse 1.5s infinite;
}

.upload-status-icon.success {
    background: linear-gradient(45deg, #56ab2f, #a8e6cf);
}

.upload-status-icon.error {
    background: linear-gradient(45deg, #ff6b6b, #ffa8a8);
}

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

.upload-status-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.upload-status-detail {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 进度条 */
.upload-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin: 15px 0;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 3px;
}



/* 操作按钮 */
.upload-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.upload-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 120px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.upload-btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.upload-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.upload-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e9ecef;
}

.upload-btn.secondary:hover {
    background: #e9ecef;
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 错误提示 */
.upload-error {
    background: #fff2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 15px;
}

/* 成功提示 */
.upload-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 15px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .upload-container {
        width: 350px;
        padding: 25px 20px;
    }
    
    .upload-status-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .upload-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .upload-btn {
        width: 100%;
        min-width: auto;
    }
} 