/* Isolated Styles for AI Background Remover */

/* Main Workspace layout */
.bg-remover-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Loader / Shimmer Styles */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer-animation 1.5s infinite linear;
}

@keyframes shimmer-animation {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Checkerboard Transparent Background */
.checkerboard-grid {
    background-color: #ffffff;
    background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
                      linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
                      linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 550px;
    width: 100%;
    box-shadow: var(--shadow-sm);
}

/* Image workspace preview */
.preview-image-el {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

/* Live progress bar custom style */
.ai-progress-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.ai-spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin: 0 auto 15px auto;
}

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

.progress-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar-outer {
    width: 100%;
    height: 8px;
    background-color: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-inner {
    width: 0%;
    height: 100%;
    background-color: var(--primary);
    transition: width 0.2s ease;
}

/* Compare Mode Slider container overrides */
.compare-slider-container {
    position: relative;
    width: 100%;
    height: 400px;
    max-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.compare-img-before,
.compare-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.compare-img-before-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid #ffffff;
}

.compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    top: calc(50% - 20px);
    background-color: var(--primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    border: 3px solid #ffffff;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.compare-handle:hover, .compare-handle:active {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

/* Background Option Selection Elements */
.bg-opt-btn {
    transition: var(--transition-base);
    font-weight: 500;
}

.bg-opt-btn.active {
    background-color: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
}

/* Blur slider widget */
.blur-control-box {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

/* Active color picker */
.color-picker-custom {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 0 0 1.5px var(--border-color);
    transition: transform 0.2s ease;
}

.color-picker-custom:hover {
    transform: scale(1.1);
}

.color-picker-custom::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-custom::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

/* Sticky Download Bar for Mobile Viewports */
@media (max-width: 991px) {
    .mobile-sticky-download {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
        padding: 12px 16px;
        z-index: 999;
        border-top: 1px solid var(--border-color);
        display: flex;
        gap: 10px;
    }
    
    .mobile-sticky-download .btn {
        flex: 1;
        min-height: 48px;
        margin: 0 !important;
    }
    
    /* offset for body to prevent footer cut-off */
    body {
        padding-bottom: 80px;
    }
}

/* Details and FAQ items formatting */
.faq-details-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    background-color: #ffffff;
    transition: var(--transition-base);
}

.faq-details-item[open] {
    box-shadow: var(--shadow-sm);
}

.faq-summary-item {
    font-weight: 600;
    color: var(--text-dark);
    padding: 14px 20px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-summary-item::-webkit-details-marker {
    display: none;
}

.faq-summary-item::after {
    content: "\F282"; /* Bootstrap bi-chevron-down */
    font-family: "bootstrap-icons";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.faq-details-item[open] .faq-summary-item::after {
    transform: rotate(180deg);
}

.faq-content-item {
    padding: 0 20px 16px 20px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}

/* Image action items overlay grid */
.image-action-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 5;
}

.image-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.image-action-btn:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
}
