/* ============================================================
   Background Remover — Styles
   ============================================================ */

/* === Lib Loading Status === */
.lib-status {
    margin-bottom: 1.5rem;
}
.lib-loading {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.lib-ready {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: rgba(63, 185, 80, 0.06);
    border: 1px solid rgba(63, 185, 80, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--accent-green);
}
.lib-error {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    background: rgba(248, 81, 73, 0.06);
    border: 1px solid rgba(248, 81, 73, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--accent-red);
}
.mini-spinner {
    width: 18px; height: 18px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}

/* === Progress Overlay === */
.progress-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(6, 8, 15, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.progress-overlay.active {
    display: flex;
}
.progress-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.progress-spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-box h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
.progress-box p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}
.progress-bar-wrap {
    height: 6px;
    background: var(--bg-surface);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.progress-percent {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* === Drop Zone === */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-card);
}
.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.drop-content i {
    font-size: 2.5rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.8rem;
}
.drop-zone:hover .drop-content i,
.drop-zone.drag-over .drop-content i {
    color: var(--accent);
}
.drop-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.drop-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.pick-btn {
    background: none;
    border: none;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}
.pick-btn:hover {
    color: var(--accent-hover);
}
.drop-note {
    font-size: 0.78rem;
    color: var(--accent-green);
    margin-top: 0.6rem;
}

/* === Result Section === */
.result-section {
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Compare === */
.compare-container {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}
.compare-item {
    flex: 1;
    min-width: 0;
}
.compare-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
    text-align: center;
}
.compare-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    max-height: 400px;
    padding: 4px;
}
.compare-box img {
    max-width: 100%;
    max-height: 390px;
    object-fit: contain;
    border-radius: 4px;
}
.compare-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    font-size: 1.2rem;
}
.checker-bg {
    background: repeating-conic-gradient(
        var(--bg-surface) 0% 25%,
        var(--bg-body) 0% 50%
    ) 50% / 16px 16px;
}

/* === Result Info === */
.result-info {
    text-align: center;
    margin-bottom: 1rem;
}
.info-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* === Background Options === */
.bg-options {
    margin-bottom: 1.2rem;
}
.bg-btns {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
    flex-wrap: wrap;
}
.bg-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    cursor: pointer;
    padding: 3px;
    background: var(--bg-surface);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.bg-btn:hover { border-color: var(--text-muted); }
.bg-btn.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}
.bg-btn span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
}
.checker-swatch {
    background: repeating-conic-gradient(
        #ccc 0% 25%, #fff 0% 50%
    ) 50% / 8px 8px !important;
}
.bg-btn-custom {
    position: relative;
    overflow: hidden;
}
.bg-btn-custom input[type="color"] {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border: none;
    cursor: pointer;
    padding: 0;
}

/* === Action Row === */
.action-row {
    display: flex;
    gap: 0.5rem;
}
.action-row .btn-primary-dark { flex: 2; }
.action-row .btn-secondary-dark { flex: 1; }

/* === Info Banner === */
.info-banner {
    display: flex;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    margin-top: 1.5rem;
    background: rgba(63, 185, 80, 0.06);
    border: 1px solid rgba(63, 185, 80, 0.15);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.info-banner > i {
    color: var(--accent-green);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* === Responsive === */
@media (max-width: 600px) {
    .compare-container { flex-direction: column; }
    .compare-arrow { transform: rotate(90deg); }
    .action-row { flex-direction: column; }
    .action-row .btn-primary-dark,
    .action-row .btn-secondary-dark { flex: 1; }
}
