/* ============================================
   Watermark Remover - Remove watermarks, logos & text from images
   Light mode default + dark mode support - Blue theme
   ============================================ */

:root {
    --wr-transition: 0.25s;

    --wr-primary: #3399cc;
    --wr-primary-light: #e0f2fe;
    --wr-primary-dark: #2980b9;
    --wr-accent: #e64e4e;

    --wr-success: #339966;
    --wr-success-light: #d1fae5;
    --wr-warning: #f59e0b;
    --wr-warning-light: #fef3c7;
    --wr-danger: #e64e4e;
    --wr-danger-light: #fee2e2;

    --wr-bg: #f0f9ff;
    --wr-bg-elevated: #ffffff;
    --wr-bg-secondary: #e0f2fe;

    --wr-text: #0c4a6e;
    --wr-text-secondary: #075985;
    --wr-text-muted: #6b7280;

    --wr-border: #bae6fd;
    --wr-border-light: #e0f2fe;

    --wr-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --wr-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --wr-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --wr-shadow-primary: 0 4px 14px rgba(51,153,204,0.25);
    --wr-shadow-primary-hover: 0 6px 20px rgba(51,153,204,0.35);

    --wr-radius-sm: 6px;
    --wr-radius-md: 12px;
    --wr-radius-lg: 16px;
    --wr-radius-full: 9999px;

    --wr-checker: #f0f0f0;
}

[data-theme="dark"] {
    --wr-primary: #60a5fa;
    --wr-primary-light: rgba(96,165,250,0.15);
    --wr-primary-dark: #3b82f6;
    --wr-accent: #f87171;

    --wr-success: #34d399;
    --wr-success-light: rgba(52,211,153,0.15);
    --wr-warning: #fbbf24;
    --wr-warning-light: rgba(251,191,36,0.15);
    --wr-danger: #f87171;
    --wr-danger-light: rgba(248,113,113,0.15);

    --wr-bg: #0c1929;
    --wr-bg-elevated: #152238;
    --wr-bg-secondary: #1e3a5f;

    --wr-text: #e0f2fe;
    --wr-text-secondary: #bae6fd;
    --wr-text-muted: #a8a8b3;

    --wr-border: #264a6e;
    --wr-border-light: #1e3a5f;

    --wr-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --wr-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
    --wr-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4);

    --wr-checker: #1e3a5f;
}

/* ============================================
   Container + header
   ============================================ */
.tool-container {
    overflow: visible !important;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.tool-header { text-align: center; margin-bottom: 2rem; }

.tool-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wr-primary);
}

.tool-title i { color: var(--wr-primary); }

.tool-description {
    max-width: 800px;
    margin: 0 auto;
    color: var(--wr-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.tool-description a { color: var(--wr-primary); text-decoration: none; }
.tool-description a:hover { text-decoration: underline; }

/* ============================================
   Buttons
   ============================================ */
.wr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--wr-radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--wr-transition);
    font-family: inherit;
}

.wr-btn-primary {
    background: var(--wr-primary);
    color: #ffffff;
    box-shadow: var(--wr-shadow-primary);
}
.wr-btn-primary:hover {
    background: var(--wr-primary-dark);
    box-shadow: var(--wr-shadow-primary-hover);
    transform: translateY(-1px);
    color: #ffffff;
}
.wr-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wr-btn-secondary {
    background: var(--wr-bg-secondary);
    color: var(--wr-text);
    border: 1px solid var(--wr-border);
}
.wr-btn-secondary:hover {
    background: var(--wr-primary-light);
    color: var(--wr-primary);
    border-color: var(--wr-primary);
}

.wr-btn-text {
    background: transparent;
    border: none;
    color: var(--wr-text-muted);
    cursor: pointer;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--wr-radius-sm);
    transition: all var(--wr-transition);
    font-family: inherit;
}
.wr-btn-text:hover { background: var(--wr-bg-secondary); color: var(--wr-primary); }
.wr-btn-text.wr-btn-text-danger:hover { color: var(--wr-danger); }

/* ============================================
   Upload dropzone
   ============================================ */
.wr-upload-section { margin-bottom: 1.5rem; }

.wr-upload-area {
    background: var(--wr-bg-elevated);
    border: 2px dashed var(--wr-border);
    border-radius: var(--wr-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--wr-transition);
    box-shadow: var(--wr-shadow-sm);
}
.wr-upload-area:hover,
.wr-upload-area.wr-dragover {
    border-color: var(--wr-primary);
    background: var(--wr-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--wr-shadow-md);
}
.wr-upload-icon { color: var(--wr-primary); width: 56px; height: 56px; margin-bottom: 1rem; }
.wr-upload-title { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 700; color: var(--wr-text); }
.wr-upload-subtitle { margin: 0 0 1.25rem; color: var(--wr-text-muted); font-size: 0.95rem; }

.wr-upload-hints {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
}
.wr-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--wr-text-muted);
    font-size: 0.825rem;
}
.wr-hint i { color: var(--wr-primary); opacity: 0.7; }

.wr-paste-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--wr-text-muted);
}
.wr-paste-tip i { color: var(--wr-primary); opacity: 0.8; }
.wr-paste-tip kbd {
    display: inline-block;
    padding: 1px 5px;
    background: var(--wr-bg-elevated);
    border: 1px solid var(--wr-border);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    color: var(--wr-text);
    line-height: 1;
}

/* ============================================
   Editor
   ============================================ */
.wr-editor-section {
    background: var(--wr-bg-elevated);
    border-radius: var(--wr-radius-lg);
    box-shadow: var(--wr-shadow-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.wr-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--wr-bg-secondary);
    border-bottom: 1px solid var(--wr-border);
    flex-wrap: wrap;
}

.wr-tool-group {
    display: inline-flex;
    background: var(--wr-bg-elevated);
    border: 1px solid var(--wr-border);
    border-radius: var(--wr-radius-full);
    padding: 3px;
    gap: 2px;
}
.wr-tool-btn {
    border: none;
    background: transparent;
    color: var(--wr-text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: var(--wr-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--wr-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
}
.wr-tool-btn:hover:not(.active) { color: var(--wr-primary); background: var(--wr-primary-light); }
.wr-tool-btn.active { background: var(--wr-primary); color: #ffffff; }

.wr-brush-size {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--wr-text-secondary);
    font-weight: 600;
}
.wr-brush-size input[type="range"] {
    width: 110px;
    height: 6px;
    border-radius: var(--wr-radius-full);
    background: var(--wr-bg-elevated);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.wr-brush-size input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--wr-primary);
    border: 2px solid var(--wr-bg-elevated);
    box-shadow: 0 0 0 1px var(--wr-primary);
    cursor: pointer;
}
.wr-brush-size input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--wr-primary);
    border: 2px solid var(--wr-bg-elevated);
    cursor: pointer;
}

.wr-toolbar-spacer { flex: 1; }

/* Canvas stage */
.wr-stage {
    padding: 1.25rem;
    display: flex;
    justify-content: center;
    background: var(--wr-bg);
    overflow: auto;
}
.wr-canvas-wrap {
    position: relative;
    line-height: 0;
    max-width: 100%;
    background-color: var(--wr-checker);
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(0,0,0,0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(0,0,0,0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(0,0,0,0.05) 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    border-radius: var(--wr-radius-sm);
    box-shadow: var(--wr-shadow-sm);
    touch-action: none;
}
.wr-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
}
#wrImageCanvas { position: relative; z-index: 1; }
#wrMaskCanvas {
    position: absolute;
    top: 0; left: 0;
    z-index: 2;
    cursor: crosshair;
    width: 100%;
    height: 100%;
}

.wr-editor-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.75rem;
    color: var(--wr-text-muted);
    font-size: 0.825rem;
    border-top: 1px solid var(--wr-border-light);
    background: var(--wr-bg);
    text-align: center;
}
.wr-editor-hint i { color: var(--wr-primary); flex-shrink: 0; }

.wr-action-bar {
    padding: 1.25rem;
    background: var(--wr-bg-elevated);
    border-top: 1px solid var(--wr-border-light);
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.wr-action-bar .wr-btn-primary { min-width: 240px; padding: 0.875rem 2rem; font-size: 1rem; }

/* ============================================
   Disclaimer banner
   ============================================ */
.wr-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin: 0 0 1.5rem;
    padding: 0.875rem 1rem;
    background: var(--wr-warning-light);
    border-radius: var(--wr-radius-md);
    font-size: 0.85rem;
    color: var(--wr-text-secondary);
    line-height: 1.5;
}
.wr-disclaimer i { color: var(--wr-warning); flex-shrink: 0; margin-top: 2px; }

/* ============================================
   Processing overlay
   ============================================ */
.wr-processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    backdrop-filter: blur(4px);
}
.wr-processing-card {
    background: var(--wr-bg-elevated);
    color: var(--wr-text);
    border-radius: var(--wr-radius-lg);
    border: 1px solid var(--wr-border);
    box-shadow: var(--wr-shadow-lg);
    padding: 1.75rem 2rem;
    min-width: 320px;
    max-width: 90%;
    text-align: center;
}
.wr-spinner {
    width: 44px; height: 44px;
    border: 4px solid var(--wr-bg-secondary);
    border-top-color: var(--wr-primary);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: wr-spin 0.9s linear infinite;
}
@keyframes wr-spin { to { transform: rotate(360deg); } }
.wr-processing-text { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.375rem; color: var(--wr-text); }
.wr-processing-subtext { font-size: 0.875rem; color: var(--wr-text-muted); margin: 0 0 1rem; }

/* Staged progress dots */
.wr-progress-stages {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1.25rem;
    flex-wrap: wrap;
}
.wr-stage-dot {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    min-width: 64px;
}
.wr-stage-dot > i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wr-bg-secondary);
    color: var(--wr-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    transition: all var(--wr-transition);
}
.wr-stage-dot span { font-size: 0.7rem; color: var(--wr-text-muted); font-weight: 600; }
.wr-stage-dot.active > i { background: var(--wr-primary); color: #fff; transform: scale(1.1); }
.wr-stage-dot.active span { color: var(--wr-primary); }
.wr-stage-dot.done > i { background: var(--wr-success); color: #fff; }
.wr-stage-dot.done span { color: var(--wr-success); }
.wr-stage-connector { width: 28px; height: 2px; background: var(--wr-border); margin: 0 4px 1rem; }
.wr-progress-bar-container {
    height: 8px;
    background: var(--wr-bg-secondary);
    border-radius: var(--wr-radius-full);
    overflow: hidden;
}
.wr-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--wr-primary);
    transition: width 0.3s ease;
    border-radius: var(--wr-radius-full);
}

/* ============================================
   Results
   ============================================ */
.wr-results-section {
    background: var(--wr-bg-elevated);
    border-radius: var(--wr-radius-lg);
    box-shadow: var(--wr-shadow-md);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.wr-results-header { margin-bottom: 1.25rem; }
.wr-success-icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--wr-success-light);
    color: var(--wr-success);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.625rem;
}
.wr-results-header h2 { margin: 0 0 0.25rem; color: var(--wr-text); font-size: 1.35rem; font-weight: 700; }
.wr-results-header p { margin: 0; color: var(--wr-text-muted); font-size: 0.9rem; }

/* Before/after slider */
.wr-compare {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 1.25rem;
    border-radius: var(--wr-radius-md);
    overflow: hidden;
    border: 1px solid var(--wr-border-light);
    user-select: none;
    line-height: 0;
}
.wr-compare img { display: block; max-width: 100%; max-height: 460px; }
.wr-compare-after {
    position: absolute;
    top: 0; left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    border-right: 2px solid #ffffff;
}
.wr-compare-after img { max-width: none; height: 100%; }
.wr-compare-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}
.wr-compare-label {
    position: absolute;
    top: 8px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.55);
    border-radius: var(--wr-radius-full);
    z-index: 3;
}
.wr-compare-label.before { left: 8px; }
.wr-compare-label.after { right: 8px; }

.wr-results-actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* ============================================
   Error
   ============================================ */
.wr-error { margin: 1rem 0; }
.wr-error-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    background: var(--wr-danger-light);
    color: var(--wr-danger);
    border-radius: var(--wr-radius-md);
    font-size: 0.9rem;
}
.wr-error-content a { color: var(--wr-danger); font-weight: 600; text-decoration: underline; }
.wr-error-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--wr-danger);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--wr-radius-sm);
    display: flex;
    flex-shrink: 0;
}
.wr-error-close:hover { background: rgba(230,78,78,0.15); }


/* ============================================
   Info sections
   ============================================ */
.wr-info-sections { max-width: 1000px; margin: 0 auto; padding: 0 2rem 2rem; }
.wr-info-card {
    background: var(--wr-bg-elevated);
    border: 1px solid var(--wr-border);
    border-radius: var(--wr-radius-lg);
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
}
.wr-info-card h2 {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wr-text);
    margin: 0 0 1.25rem;
}
.wr-info-card h2 i { color: var(--wr-primary); }
.wr-info-card p, .wr-info-card li { color: var(--wr-text-secondary); line-height: 1.7; margin: 0 0 0.75rem; }
[data-theme="dark"] .wr-info-card p,
[data-theme="dark"] .wr-info-card li { color: var(--wr-text-muted); }
.wr-info-card a { color: var(--wr-primary); text-decoration: none; font-weight: 500; }
.wr-info-card a:hover { text-decoration: underline; }

.wr-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.wr-feature-item {
    padding: 1.25rem;
    background: var(--wr-bg);
    border: 1px solid var(--wr-border-light);
    border-radius: var(--wr-radius-md);
}
.wr-feature-item i { color: var(--wr-primary); margin-bottom: 0.625rem; display: block; }
.wr-feature-item h4 { margin: 0 0 0.375rem; font-size: 0.95rem; font-weight: 700; color: var(--wr-text); }
.wr-feature-item p { margin: 0; font-size: 0.85rem; color: var(--wr-text-muted); line-height: 1.5; }

/* FAQ */

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .tool-container { padding: 1rem; }
    .tool-title { font-size: 1.4rem; }
    .wr-upload-area { padding: 2rem 1rem; }
    .wr-upload-title { font-size: 1.2rem; }
    .wr-toolbar { gap: 0.5rem; }
    .wr-action-bar .wr-btn-primary { width: 100%; min-width: 0; }
     .wr-info-sections { padding-left: 1rem; padding-right: 1rem; }
    .wr-info-card { padding: 1.25rem; }
    .wr-processing-card { min-width: 280px; padding: 1.25rem; }
}

/* Hand-off to / from the 4K Image Upscaler (2026-10-10) */
.wr-ho-msg { margin: 0.75rem 0 0; text-align: center; font-size: 0.85rem; color: var(--wr-text-muted); }
.wr-ho-msg.is-bad { color: var(--wr-danger); }
.wr-ho-msg a { color: inherit; text-decoration: underline; }
.wr-btn:disabled { opacity: 0.6; cursor: progress; }

/* Shared steps list + FAQ (main CSS) follow the tool accent (2026-10-11) */
.tool-container { --tool-accent: var(--wr-primary, #3399cc); }
