/* ── Image Sharpen Tool ─────────────────────────────────────── */
/* Prefix: ish-   Accent: #8B5CF6 */
.ish-section {
    padding: 40px 0 80px;
}

.ish-upload-zone {
    border: 2px dashed rgba(139, 92, 246, 0.35);
    border-radius: 16px;
    background: rgba(139, 92, 246, 0.04);
    padding: 56px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

.ish-upload-zone:hover,
.ish-upload-zone:focus,
.ish-upload-zone.ish-drag-over {
    border-color: #8B5CF6;
    background: rgba(139, 92, 246, 0.08);
}

.ish-upload-icon {
    font-size: 3rem;
    color: #8B5CF6;
    opacity: 0.7;
    margin-bottom: 14px;
    display: block;
}

.ish-upload-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.ish-upload-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* ── Side-by-side layout ─────────────────────────────────── */
.ish-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 24px;
}

.ish-col-controls {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ish-col-preview {
    min-width: 0;
}

/* ── Panel sections ──────────────────────────────────────── */
.ish-panel-section {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.ish-panel-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.6rem;
}

.ish-method-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ish-method-tab {
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ish-method-tab:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.ish-method-tab.active {
    background: #8B5CF6;
    border-color: #8B5CF6;
    color: #fff;
}

.ish-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(139, 92, 246, 0.2);
    outline: none;
    cursor: pointer;
}

.ish-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8B5CF6;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.ish-val-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 0.8125rem;
    font-family: monospace;
}

/* ── Format select ───────────────────────────────────────── */
.ish-select {
    width: 100%;
    padding: 0.45rem 0.75rem;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary, #0f172a);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.25rem;
}

.ish-select:focus {
    border-color: #8B5CF6;
}

/* ── Actions ─────────────────────────────────────────────── */
.ish-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ish-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.ish-btn-primary {
    background: #8B5CF6;
    color: #fff;
    border-color: #8B5CF6;
}

.ish-btn-primary:hover {
    filter: brightness(1.1);
}

.ish-btn-secondary {
    background: transparent;
    border-color: #8B5CF6;
    color: #8B5CF6;
}

.ish-btn-secondary:hover {
    background: rgba(139, 92, 246, 0.08);
}

.ish-btn-ghost {
    background: #F1F5F9;
    color: var(--text-secondary, #64748b);
    border-color: rgba(100, 116, 139, 0.2);
}

.ish-btn-ghost:hover {
    border-color: #8B5CF6;
    color: #8B5CF6;
}

/* ── Before/After compare slider ────────────────────────── */
.ish-compare-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: #f1f5f9;
    cursor: col-resize;
    user-select: none;
    touch-action: none;
}

.ish-canvas-bg {
    width: 100%;
    height: auto;
    display: block;
}

.ish-canvas-fg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: inset(0 0 0 50%);
}

.ish-compare-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ish-handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #fff;
    transform: translateX(-50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.ish-handle-grip {
    width: 36px;
    height: 36px;
    background: #8B5CF6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 2;
}

.ish-compare-label {
    position: absolute;
    top: 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    padding: 2px 8px;
    border-radius: 4px;
    pointer-events: none;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ish-label-left {
    left: 10px;
}

.ish-label-right {
    right: 10px;
}

/* ── Processing button state ─────────────────────────────── */
.ish-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: none;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .ish-layout {
        grid-template-columns: 1fr;
    }

    .ish-col-controls {
        position: static;
    }

    .ish-method-tab {
        font-size: 0.8125rem;
        padding: 0.35rem 0.6rem;
    }
}