/* AI移除布纹页面样式 */

/* 主容器 */
.remove-fabric-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 5px 0 20px 0;
    box-sizing: border-box;
    width: 100%;
}

.remove-fabric-content {
    display: flex;
    flex-direction: column;
    height: auto;
}

.remove-fabric-description {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
    font-size: 16px;
    color: #333;
}

.remove-fabric-main {
    display: flex;
    gap: 30px;
    height: auto;
    margin-left: var(--spacing-lg);
    margin-right: var(--spacing-lg);
    box-sizing: border-box;
}

.remove-fabric-left {
    flex: 2;
    min-width: 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: auto;
    margin-bottom: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.remove-fabric-right {
    flex: 3;
    min-width: 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: auto;
    margin-bottom: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

/* 上传区域样式 */
.remove-fabric-upload-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.upload-area {
    position: relative;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    min-height: 400px;
    height: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-area:hover {
    border-color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.05);
}

.upload-area.dragover {
    border-color: #4f46e5;
    background-color: rgba(79, 70, 229, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
    font-weight: 300;
}

.upload-placeholder p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

.upload-hint {
    color: #9ca3af;
    font-size: 14px;
    margin-top: 5px;
}

#remove-fabric-preview-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#remove-fabric-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.remove-fabric-remove-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.9);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.remove-fabric-remove-button:hover {
    background-color: rgba(239, 68, 68, 1);
}

/* 参数区域样式 */
.remove-fabric-parameters {
    margin-top: 20px;
}

/* 免费试用提示样式 */
.free-trial-tip {
    margin-top: 12px;
    margin-bottom: 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 处理按钮样式 - 参考edit_image页面样式 */
.remove-fabric-process-button {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.remove-fabric-process-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.remove-fabric-process-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state styles for remove fabric button */
.btn-text {
    display: inline-block;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

/* 右侧面板样式 */
.remove-fabric-right h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 状态面板 */
.status-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.3s ease;
    width: 0%;
}

/* 结果面板 */
.result-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.result-container {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

#result-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.result-button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn {
    background-color: #059669;
    color: white;
}

.download-btn:hover {
    background-color: #047857;
    color: white;
}

.new-task-btn {
    background-color: #6b7280;
    color: white;
}

.new-task-btn:hover {
    background-color: #4b5563;
}

/* 错误面板 */
.error-panel {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.error-panel h3 {
    color: #dc2626;
    margin-top: 0;
    margin-bottom: 10px;
}

.error-panel p {
    color: #7f1d1d;
    margin-bottom: 15px;
}

.error-button {
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.error-button:hover {
    background-color: #b91c1c;
}

/* 说明面板 */
.instructions-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

/* 效果展示面板 */
.effect-demo-panel {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.effect-demo-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.effect-demo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.effect-demo-item {
    flex: 1;
    text-align: center;
}

.effect-demo-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 8px;
}

.effect-demo-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.effect-demo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.effect-demo-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f3f4f6;
    border-radius: 50%;
    margin: 0 10px;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.instructions-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    font-size: 14px;
    color: #374151;
}

.step-number {
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
    flex-shrink: 0;
}

.tips-section {
    background-color: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    padding: 15px;
}

.tips-section h4 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}

.tips-section p {
    margin: 0;
    color: #374151;
    font-size: 13px;
    line-height: 1.4;
}

/* 加载动画 - 参考edit_image页面样式 */
.spinner {
    width: 16px !important;
    height: 16px !important;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0;
    flex-shrink: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .remove-fabric-main {
        flex-direction: column;
        gap: 20px;
        margin-left: var(--spacing-md);
        margin-right: var(--spacing-md);
    }
    
    .remove-fabric-left,
    .remove-fabric-right {
        padding: 15px;
        flex: none !important;
        width: 100% !important;
    }
    
    .upload-area {
        min-height: 250px;
        height: 250px;
    }
    
    .remove-fabric-description {
        padding: 0 15px;
        font-size: 14px;
    }
    
    .effect-demo-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .effect-demo-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
    
    .effect-demo-image-wrapper {
        aspect-ratio: 1/1;
    }
}

.nav-link.active {
    color: #4f46e5;
    font-weight: 600;
}