/* Product Background Remover - Frontend Styles */
.pbr-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F5;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.pbr-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 15px;
    color: white;
}

.pbr-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
}

.pbr-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.pbr-upload-area {
    background: white;
    border: 3px dashed #4CAF50;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pbr-upload-area:hover {
    border-color: #45a049;
    background: #f8fff8;
    transform: translateY(-2px);
}

.pbr-upload-area.dragover {
    border-color: #FF4500;
    background: #fff8f8;
    transform: scale(1.02);
}

.pbr-upload-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

.pbr-upload-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 500;
}

.pbr-upload-subtext {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.pbr-file-input {
    display: none !important;
}

.pbr-upload-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    position: relative;
    z-index: 999 !important;
    pointer-events: auto !important;
    display: inline-block;
    text-decoration: none;
    text-align: center;
    line-height: 1.5;
}

.pbr-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.pbr-upload-btn:active {
    transform: translateY(0);
}

.pbr-settings {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pbr-settings h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.pbr-setting-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.pbr-setting-item {
    display: flex;
    flex-direction: column;
}

.pbr-setting-item label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.pbr-setting-item select,
.pbr-setting-item input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.pbr-setting-item select:focus,
.pbr-setting-item input[type="text"]:focus {
    outline: none;
    border-color: #4CAF50;
}

.pbr-process-btn {
    background: linear-gradient(135deg, #FF4500 0%, #FF6347 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
    width: 100%;
    margin-top: 20px;
}

.pbr-process-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
}

.pbr-process-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pbr-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.pbr-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pbr-result {
    display: none;
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pbr-result h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.pbr-image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.pbr-image-container {
    text-align: center;
}

.pbr-image-container h4 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 16px;
    font-weight: 500;
}

.pbr-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pbr-download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    text-decoration: none;
    display: inline-block;
    margin: 10px;
}

.pbr-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    color: white;
    text-decoration: none;
}

.pbr-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #f44336;
}

.pbr-success {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #4CAF50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pbr-container {
        padding: 15px;
        margin: 10px;
    }
    
    .pbr-upload-area {
        padding: 30px 20px;
    }
    
    .pbr-setting-group {
        grid-template-columns: 1fr;
    }
    
    .pbr-image-comparison {
        grid-template-columns: 1fr;
    }
    
    .pbr-header h2 {
        font-size: 24px;
    }
    
    .pbr-header p {
        font-size: 14px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .pbr-container {
        background: #2d2d2d;
        color: #fff;
    }
    
    .pbr-upload-area,
    .pbr-settings,
    .pbr-result {
        background: #3d3d3d;
        color: #fff;
    }
    
    .pbr-upload-text {
        color: #fff;
    }
    
    .pbr-upload-subtext {
        color: #ccc;
    }
    
    .pbr-setting-item label {
        color: #ccc;
    }
    
    .pbr-setting-item select,
    .pbr-setting-item input[type="text"] {
        background: #4d4d4d;
        border-color: #555;
        color: #fff;
    }
}
