/* 移动端上传区域优化样式 */

/* 针对小屏幕设备的上传区域优化 */
@media (max-width: 576px) {
    /* 减小上传区域的内边距 */
    .upload-item {
        padding: 20px 15px !important;
        border-radius: 12px !important;
        min-height: 110px !important;
    }
    
    /* 减小上传图标尺寸 */
    .upload-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
    }
    
    /* 调整标题文字大小 */
    .upload-title {
        font-size: 1rem !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }
    
    /* 调整副标题文字大小 */
    .upload-subtitle {
        font-size: 0.8rem !important;
        margin-bottom: 8px !important;
        line-height: 1.4 !important;
    }
    
    /* 优化移动端提示文字 */
    .mobile-hint {
        font-size: 0.75rem !important;
        display: block !important;
        line-height: 1.4 !important;
    }
    
    /* 减小上传区域间距 */
    .upload-area {
        gap: 12px !important;
        margin: 20px 0 !important;
    }
    
    /* 优化文件信息徽章 */
    .file-info-badge {
        top: 8px !important;
        right: 8px !important;
        padding: 3px 8px !important;
        font-size: 10px !important;
        border-radius: 12px !important;
    }
    
    /* 优化触摸目标 */
    .upload-item {
        touch-action: manipulation !important;
    }
    
    /* 增强触摸反馈 */
    .upload-item:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* 优化文件输入框在移动端的显示 */
    .file-input {
        min-height: 44px !important; /* 符合移动端触摸目标大小标准 */
    }
    
    /* 使证书和描述文件上传区域在一行显示 */
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 针对更小屏幕设备的进一步优化 */
@media (max-width: 400px) {
    .upload-item {
        padding: 15px 10px !important;
        min-height: 100px !important;
    }
    
    .upload-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        border-radius: 10px !important;
    }
    
    .upload-title {
        font-size: 0.9rem !important;
    }
    
    .upload-subtitle {
        font-size: 0.75rem !important;
    }
    
    .mobile-hint {
        font-size: 0.7rem !important;
    }
    
    .upload-area {
        gap: 10px !important;
    }
    
    /* 在极小屏幕上仍然保持两列布局以实现并排显示 */
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 针对触摸设备的优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增加触摸目标大小 */
    .upload-item {
        padding: 25px 15px !important;
        min-height: 120px !important;
    }
    
    /* 确保图标足够大便于触摸 */
    .upload-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 22px !important;
    }
    
    /* 增加触摸反馈 */
    .upload-item:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease !important;
    }
    
    /* 优化移动端提示 */
    .mobile-hint {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        animation: pulse 1.5s infinite !important;
    }
    
    /* 确保文件输入框在触摸设备上有足够的触摸区域 */
    .file-input {
        min-height: 48px !important;
    }
    
    /* 在触摸设备上使用两列布局 */
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 平板设备优化 */
@media (min-width: 577px) and (max-width: 768px) {
    .upload-item {
        padding: 25px 20px !important;
        min-height: 130px !important;
    }
    
    .upload-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        border-radius: 16px !important;
    }
    
    .upload-title {
        font-size: 1.05rem !important;
    }
    
    .upload-subtitle {
        font-size: 0.85rem !important;
    }
    
    /* 在平板设备上使用两列布局 */
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* 确保在所有设备上都有良好的视觉效果 */
.upload-item {
    transition: all 0.2s ease !important;
}

.upload-icon {
    transition: all 0.2s ease !important;
}

/* 优化动画效果 */
@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* 确保在所有屏幕尺寸下都有良好的布局 */
.upload-area {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 20px !important;
    margin: 25px 0 !important;
}

/* 在小屏幕设备上，证书和描述文件上传区域并排显示 */
@media (max-width: 576px) {
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* 确保在576px以下的设备上覆盖其他样式 */
    .upload-item {
        padding: 20px 15px !important;
        min-height: 110px !important;
    }
}

/* 特别处理480px以下的样式，仍然保持两列布局 */
@media (max-width: 480px) {
    .upload-area {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .upload-item {
        padding: 15px 10px !important;
        min-height: 100px !important;
    }
}

/* 覆盖 modern-unified-style.css 中的样式 */
@media (max-width: 768px) {
    .upload-item {
        padding: 20px 15px !important;
        min-height: 110px !important;
    }
}