/**
 * Background Remover - WordPress Plugin Styles
 * Modern, app-like UI for background removal tool
 */

.background-remover-tool {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.br-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.br-header {
    background: linear-gradient(to right, #667eea, #764ba2);
    padding: 1.5rem;
    color: white;
}

.br-header h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.br-header p {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.br-body {
    padding: 1.5rem;
}

/* Upload Section */
.upload-section {
    margin-bottom: 1.5rem;
}

.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f7fafc;
    position: relative;
    z-index: 1;
}

.file-input-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 999 !important;
    font-size: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.upload-area:hover {
    border-color: #667eea;
    background: #edf2f7;
}

.upload-area.dragover {
    border-color: #667eea;
    background: #e6fffa;
    border-style: solid;
}

.upload-content {
    pointer-events: none; /* Ensure clicks pass through to file input */
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.upload-area p {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.upload-area small {
    font-size: 0.875rem;
    color: #718096;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 3rem 2rem;
    background: #f7fafc;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.loading-state.hidden {
    display: none;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
}

.loading-state small {
    font-size: 0.875rem;
    color: #718096;
}

/* Results Section */
.results-section {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-section.hidden {
    display: none;
}

.comparison-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.image-preview {
    background: #f7fafc;
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    border: 2px solid #e5e7eb;
}

.image-preview h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: #4a5568;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.image-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Download Actions */
.download-actions {
    text-align: center;
    margin-top: 1.5rem;
}

.format-selector {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 0.5rem;
}

.format-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.875rem;
}

.format-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.format-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #cbd5e0;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: #4a5568;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.format-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f7fafc;
}

.format-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(to right, #667eea, #764ba2);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
    background: linear-gradient(to right, #5a67d8, #6b46c1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 2rem;
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.error-state.hidden {
    display: none;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.error-state p {
    color: #dc2626;
    font-weight: 600;
    margin: 0;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 640px) {
    .background-remover-tool {
        padding: 1rem 0.75rem;
    }
    
    .comparison-view {
        grid-template-columns: 1fr;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
}

/* Hidden Class */
.hidden {
    display: none !important;
}

