/* 商品清单导入功能样式 */

/* 浮动按钮样式 */
.list-import-floating-btn {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    width: 64px !important;
    height: 64px !important;
    background: linear-gradient(135deg, #4CAF50, #45a049) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
    cursor: pointer !important;
    z-index: 999 !important;
    transition: all 0.3s ease !important;
    font-size: 10px !important;
    text-align: center !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 4px !important;
}

.list-import-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

.list-import-floating-btn svg {
    width: 28px;
    height: 28px;
}

/* 模态窗口样式 */
.list-import-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.list-import-modal.show {
    opacity: 1;
    visibility: visible;
}

.list-import-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.list-import-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.list-import-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.list-import-close-btn {
    background: #f5f5f5;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 20px;
    position: relative;
    overflow: hidden;
}

.list-import-close-btn::before,
.list-import-close-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #666;
    transition: background-color 0.3s ease;
}

.list-import-close-btn::before {
    transform: rotate(45deg);
}

.list-import-close-btn::after {
    transform: rotate(-45deg);
}

.list-import-close-btn:hover {
    background: #ff4444;
    transform: scale(1.1);
}

.list-import-close-btn:hover::before,
.list-import-close-btn:hover::after {
    background-color: white;
}

.list-import-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.list-import-instruction {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

#list-import-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#list-import-textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.list-import-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.list-import-primary-btn {
    padding: 10px 20px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.list-import-primary-btn:hover:not(:disabled) {
    background: #45a049;
}

.list-import-primary-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.list-import-actions button:not(.list-import-primary-btn),
.list-import-modal-footer button:not(.list-import-primary-btn) {
    padding: 10px 20px;
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.list-import-actions button:not(.list-import-primary-btn):hover,
.list-import-modal-footer button:not(.list-import-primary-btn):hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* 结果区域样式 */
.list-import-results {
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}

.list-import-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.list-import-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.list-import-results-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.list-import-results-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.list-import-results-table tr:last-child td {
    border-bottom: none;
}

.list-import-status-matched {
    color: #4CAF50;
    font-weight: 500;
}

.list-import-status-unmatched {
    color: #f44336;
}

.list-import-status-pending {
    color: #ff9800;
}

.list-import-remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.list-import-remove-item:hover {
    background: #ffebee;
    color: #f44336;
}

.list-import-summary {
    padding: 15px;
    background: #f8f9fa;
    text-align: right;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #eee;
}

/* 模态窗口底部样式 */
.list-import-modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .list-import-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .list-import-floating-btn {
        bottom: 70px !important;
        right: 15px !important;
        width: 50px !important;
        height: 50px !important;
    }
    
    .list-import-actions {
        flex-direction: column;
    }
    
    .list-import-actions button {
        width: 100%;
    }
    
    .list-import-results-table {
        font-size: 13px;
    }
    
    .list-import-results-table th,
    .list-import-results-table td {
        padding: 8px;
    }
}

/* 滚动条样式 */
.list-import-results::-webkit-scrollbar {
    width: 6px;
}

.list-import-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.list-import-results::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.list-import-results::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.list-import-results-table tr {
    animation: fadeIn 0.3s ease-in;
}

/* 工具提示样式 */
[title] {
    cursor: help;
}

/* 输入框焦点状态 */
#list-import-textarea:focus {
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}