/* Hshop Product Image Studio - Modern Dark Glassmorphism Styling */

:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.75);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-glow: 0 10px 30px -10px rgba(59, 130, 246, 0.3);
}

.studio-container {
    padding: 24px;
    max-width: 1440px;
    margin: 0 auto;
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Header Banner */
.studio-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.studio-title-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-cyan);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.studio-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(90deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.studio-header p {
    margin: 6px 0 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Main Grid Layout */
.studio-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

@media (max-width: 1024px) {
    .studio-grid {
        grid-template-columns: 1fr;
    }
}

/* Workspace Canvas Card */
.studio-workspace-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    min-height: 580px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Drag & Drop Zone */
.dropzone-area {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.4);
    border-radius: 14px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dropzone-area:hover, .dropzone-area.drag-over {
    border-color: var(--accent-cyan);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.dropzone-icon {
    font-size: 3.5rem;
    color: var(--accent-blue);
    margin-bottom: 16px;
    transition: transform 0.3s ease;
}

.dropzone-area:hover .dropzone-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Interactive Split Comparison Slider (Before / After) */
.comparison-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    height: 520px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: #ffffff; /* Checkboard background or pure white */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    user-select: none;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.after-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%; /* Controlled dynamically by slider JS */
    height: 100%;
    overflow: hidden;
    z-index: 2;
    background: #ffffff;
}

.after-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

/* Comparison Handle Slider */
.comparison-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--accent-cyan);
    z-index: 10;
    cursor: ew-resize;
    box-shadow: 0 0 12px rgba(6, 182, 212, 0.8);
}

.comparison-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid var(--accent-cyan);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Floating Labels */
.badge-label-before, .badge-label-after {
    position: absolute;
    top: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 12;
    backdrop-filter: blur(8px);
}

.badge-label-before {
    right: 14px;
    background: rgba(15, 23, 42, 0.75);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-label-after {
    left: 14px;
    background: rgba(16, 185, 129, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Sidebar Control Panel */
.studio-sidebar {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.control-val {
    color: var(--accent-cyan);
    font-family: monospace;
    font-size: 0.85rem;
}

.range-input {
    width: 100%;
    accent-color: var(--accent-blue);
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
}

/* Action Buttons */
.btn-primary-action {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}

.btn-primary-action:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-success-action {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-success-action:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.btn-secondary-action {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-secondary-action:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Batch Processing Queue Thumbnails */
.batch-queue-container {
    margin-top: 16px;
    border-top: 1px solid var(--card-border);
    padding-top: 16px;
}

.batch-thumb-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.batch-thumb-item {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid transparent;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-thumb-item.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* Spinner & Loading Overlay */
.loading-spinner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    border-radius: 14px;
}

.glow-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

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