/**
 * Stylesheet: batch-image-watermark-protector.css
 * Tool 16: Batch Image Watermark & Copyright Protector Studio
 *
 * Strict 2-Column Desktop / 1-Column Mobile Layout
 * Modern Creative Studio Visual Identity
 */

/* ── Root Workspace ── */
.biw-workspace {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.tool-workspace.biw-workspace {
    grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
    align-items: start;
}

@media (min-width: 1025px) {
    .biw-preview {
        position: sticky;
        top: 90px;
        align-self: start;
        z-index: 10;
    }
}

@media (max-width: 1024px) {
    .tool-workspace.biw-workspace {
        grid-template-columns: 1fr;
    }
}

/* ── Top Tool Header Banner ── */
.biw-header-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
}

.biw-header-left {
    max-width: 760px;
}

.biw-badge-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-3);
}

.biw-studio-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.18;
    color: var(--text-heading);
    margin: 0 0 var(--space-3);
    letter-spacing: -0.025em;
}

.biw-title-gradient {
    background: linear-gradient(135deg, #10b981 0%, #38bdf8 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.biw-studio-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.biw-header-right {
    flex-shrink: 0;
}

.biw-quick-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.biw-pill-stat {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 11px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.biw-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: biwPulse 2s infinite;
}

@keyframes biwPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Upload Stage ── */
.biw-upload-stage {
    margin: var(--space-4) 0 var(--space-8);
}

.biw-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-14) var(--space-8);
    border: 2px dashed rgba(16, 185, 129, 0.35);
    background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.06), transparent 70%),
                rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.biw-dropzone:hover,
.biw-dropzone.dragover {
    border-color: #10b981;
    background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.12), transparent 70%),
                rgba(15, 23, 42, 0.75);
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.biw-hidden-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.biw-drop-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    margin-bottom: var(--space-5);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.biw-glow-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    animation: biwGlowRing 3s ease-in-out infinite;
}

@keyframes biwGlowRing {
    0%, 100% { opacity: 0.4; transform: scale(0.96); }
    50% { opacity: 0.9; transform: scale(1.05); }
}

.biw-drop-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 var(--space-2);
}

.biw-drop-desc {
    max-width: 620px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 var(--space-6);
}

.biw-drop-actions {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    z-index: 6;
}

.biw-btn-browse,
.biw-btn-sample {
    position: relative;
    z-index: 6;
}

.biw-drop-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.biw-drop-features span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Top Studio Toolbar ── */
.biw-top-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-subtle);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.biw-toolbar-file {
    display: flex;
    align-items: center;
}

.biw-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

.biw-pill-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding-left: 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.biw-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.biw-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* ══════════════════════════════════════════════════════════
   STRICT 2-COLUMN DESKTOP / 1-COLUMN MOBILE GRID
   ══════════════════════════════════════════════════════════ */
.biw-grid-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, 440px);
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1024px) {
    .biw-grid-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Card Styling ── */
.biw-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    position: relative;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.biw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.biw-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
}

.biw-step-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 2px 8px;
    border-radius: 9999px;
}

/* ── Column 1: Live Canvas Viewport ── */
.biw-stage-card {
    display: flex;
    flex-direction: column;
    min-height: 520px;
}

.biw-stage-header {
    margin-bottom: var(--space-3);
}

.biw-stage-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.biw-status-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.biw-canvas-viewport {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    min-height: 420px;
    overflow: hidden;
}

.biw-canvas-wrapper {
    position: relative;
    display: inline-block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.75);
    max-width: 100%;
    max-height: 100%;
}

.biw-preview-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.biw-stage-footer {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.biw-footer-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Filmstrip Queue ── */
.biw-filmstrip-card {
    margin-top: var(--space-4);
    padding: var(--space-4);
}

.biw-filmstrip-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.biw-filmstrip-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.biw-filmstrip-item {
    position: relative;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #000;
    cursor: pointer;
    transition: all 0.18s;
}

.biw-filmstrip-item:hover {
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
}

.biw-filmstrip-item.active {
    border-color: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.biw-filmstrip-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.biw-filmstrip-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(15, 23, 42, 0.85);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
}

/* ── Column 2: Design Controls ── */
.biw-controls-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Watermark Layer Type Tabs */
.biw-tabs-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border-subtle);
    padding: 4px;
    border-radius: var(--radius-xl);
}

.biw-tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.biw-tab-btn:hover {
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.05);
}

.biw-tab-btn.active {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Logo Section */
.biw-logo-dropzone {
    position: relative;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.25);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.biw-logo-dropzone:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.biw-logo-preview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.biw-logo-preview-box img {
    max-height: 32px;
    max-width: 120px;
    object-fit: contain;
}

/* Checkbox Toggle Row */
.biw-toggle-row {
    margin: var(--space-3) 0 var(--space-1);
}

.biw-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.biw-checkbox-label input {
    display: none;
}

.biw-check-square {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all 0.18s;
}

.biw-checkbox-label input:checked + .biw-check-square {
    background: #10b981;
    border-color: #10b981;
}

.biw-checkbox-label input:checked + .biw-check-square::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #000;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.biw-perm-desc {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.biw-perm-desc strong {
    font-size: 0.85rem;
    color: var(--text-heading);
}

.biw-perm-desc span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.biw-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-4) 0;
}

/* Inputs & Selects */
.biw-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: var(--space-3);
}

.biw-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.biw-text-input,
.biw-select {
    width: 100%;
    padding: 9px 12px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    transition: all 0.18s;
}

.biw-text-input:focus,
.biw-select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.biw-inline-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.biw-inline-grid-3 {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-2);
}

.biw-color-input-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 4px 8px;
}

.biw-color-input {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
}

#biwColorHexReadout {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-secondary);
}

/* Placement Mode Switcher */
.biw-mode-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--space-4);
}

.biw-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.biw-mode-btn:hover {
    color: var(--text-heading);
    background: rgba(255, 255, 255, 0.05);
}

.biw-mode-btn.active {
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 9-Point Snap Grid */
.biw-snap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: var(--space-4);
}

.biw-snap-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
}

.biw-snap-btn:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.biw-snap-btn.active {
    background: rgba(16, 185, 129, 0.22);
    border-color: #10b981;
    color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Sliders */
.biw-slider-row {
    margin-bottom: var(--space-3);
}

.biw-slider-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.biw-range {
    width: 100%;
    accent-color: #10b981;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

/* ── Action Card & Export ── */
.biw-action-card {
    background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08), transparent 70%),
                rgba(15, 23, 42, 0.85);
    border-color: rgba(16, 185, 129, 0.25);
}

.biw-action-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0 0 2px;
}

.biw-action-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 var(--space-3);
}

.biw-btn-export {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
    cursor: pointer;
    transition: all 0.22s;
}

.biw-btn-export:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.45);
}

.biw-btn-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress Bar */
.biw-progress-wrap {
    margin-bottom: var(--space-3);
}

.biw-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.biw-progress-bar-bg {
    width: 100%;
    height: 7px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.biw-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    transition: width 0.15s;
}

/* Trust Badge Footer */
.biw-trust-footer-card {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}
