/* Image Color Picker — icp- */
.icp-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;
}

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

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

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

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

.icp-section {
    padding: 40px 0 60px;

}

.icp-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem
}

.icp-badge {
    width: 44px;
    height: 44px;
    background: rgba(139, 92, 246, .15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #8B5CF6;
    flex-shrink: 0
}

.icp-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 .2rem
}

.icp-subtitle {
    font-size: 0.9375rem;
    color: #64748B;
    margin: 0
}

.icp-canvas-wrap {
    position: relative;
    display: inline-block;
    cursor: crosshair;
    max-width: 100%;
    margin-bottom: .5rem
}

#icp-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #E2E8F0
}

.icp-cursor-zoom {
    position: absolute;
    pointer-events: none;
    border: 2px solid #8B5CF6;
    border-radius: 50%;
    width: 82px;
    height: 82px;
    overflow: hidden;
    margin-left: 10px;
    margin-top: -90px
}

#icp-zoom-canvas {
    display: block
}

.icp-hint-text {
    font-size: 0.8125rem;
    color: #5A5A78;
    margin: .3rem 0 1rem
}

.icp-result {
    display: none;
}

.icp-result-inner {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.icp-swatch {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    flex-shrink: 0;
    border: 2px solid #E2E8F0
}

.icp-values {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .4rem
}

.icp-val-row {
    display: flex;
    align-items: center;
    gap: .6rem
}

.icp-val-label {
    font-size: 0.9375rem;
    color: #5A5A78;
    width: 2.5rem;
    flex-shrink: 0
}

.icp-val-code {
    background: #F1F5F9;
    border-radius: 4px;
    padding: .2rem .5rem;
    font-size: 0.9375rem;
    color: #0F172A;
    font-family: monospace;
    flex: 1
}

.icp-copy-btn {
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 5px;
    color: #64748B;
    cursor: pointer;
    padding: .2rem .45rem;
    font-size: 0.9375rem;
    transition: all .2s
}

.icp-copy-btn:hover {
    border-color: #8B5CF6;
    color: #8B5CF6
}

.icp-history-label {
    font-size: 0.9375rem;
    color: #64748B;
    margin-bottom: .5rem
}

.icp-history {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem
}

.icp-history-swatch {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    border: 2px solid #E2E8F0;
    cursor: pointer;
    transition: transform .15s
}

.icp-history-swatch:hover {
    transform: scale(1.15);
    border-color: #8B5CF6
}

@media(max-width:600px) {
    .icp-result-inner {
        flex-direction: column;
        align-items: flex-start
    }
}

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

.icp-col-canvas {
    min-width: 0;
}

.icp-col-panel {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

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

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

/* ── Dominant palette ────────────────────────────────── */
.icp-palette-grid {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.icp-palette-item {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.icp-palette-swatch {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, .08);
    flex-shrink: 0;
    cursor: pointer;
    transition: transform .15s;
}

.icp-palette-swatch:hover {
    transform: scale(1.12);
}

.icp-palette-hex {
    flex: 1;
    font-size: 0.8125rem;
    color: #0F172A;
    font-family: monospace;
    background: #F1F5F9;
    border-radius: 4px;
    padding: .15rem .4rem;
}

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

.icp-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

.icp-btn--ghost {
    background: #F1F5F9;
    color: var(--text-secondary, #64748b);
    border: 1px solid rgba(100, 116, 139, .2);
}

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

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

    .icp-col-panel {
        position: static;
    }

    .icp-palette-grid {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .icp-palette-item {
        flex: 1 1 120px;
    }
}