/* ============================================================
   Inpaint tool — integrated into the DROCHILA shell
   ============================================================ */
.ip-shell { flex: 1; display: flex; min-height: 0; }

#canvasWrap {
  flex: 1;
  position: relative;
  min-width: 0;
  background: radial-gradient(1100px 560px at 40% 0%, #12141d 0%, var(--bg) 62%);
  overflow: hidden;
}

#view { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }

#brushCursor {
  position: absolute;
  pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .55);
  display: none;
  z-index: 5;
}

#dropOverlay {
  position: absolute;
  inset: 20px;
  border: 2px dashed #2c3346;
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  z-index: 4;
}
#dropOverlay:hover, #dropOverlay.dragover { border-color: var(--accent); background: rgba(124, 92, 255, .06); }
#dropOverlay.hidden { display: none; }

.drop-inner { text-align: center; color: var(--muted); }
.drop-icon { font-size: 42px; margin-bottom: 10px; opacity: .7; }
.drop-title { font-size: 17px; color: var(--text); font-weight: 700; }
.drop-sub { margin-top: 7px; font-size: 12.5px; line-height: 1.6; color: var(--dim); }

#resultBar {
  position: absolute;
  left: 50%; bottom: 20px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  background: rgba(20, 22, 31, .93);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  z-index: 6;
}
#resultBar.hidden { display: none; }
.rb-label { color: var(--dim); font-size: 11.5px; font-weight: 600; }
.rb-sep { width: 1px; height: 22px; background: var(--border); margin: 0 3px; }
#splitRange { width: 150px; }

/* side panel */
.ip-side {
  flex: 0 0 310px;
  border-left: 1px solid var(--border-soft);
  background: var(--bg-2);
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ip-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 13px 14px;
}
.ip-panel h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--dim);
  margin-bottom: 10px;
  font-weight: 700;
}

.tool-row { display: flex; gap: 6px; margin-bottom: 10px; }
.tool {
  flex: 1;
  font-size: 16px;
  padding: 7px 0;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: background .14s, border-color .14s;
}
.tool:hover { background: var(--surface-3); }
.tool.active { border-color: var(--accent); background: rgba(124, 92, 255, .16); }

.slider-label { display: block; color: var(--muted); font-size: 12px; margin-top: 9px; font-weight: 500; }
.slider-label span { color: var(--text); font-weight: 700; }
.slider-label input[type="range"] { margin-top: 5px; }

#refZone { margin-bottom: 8px; }
#refEmpty {
  border: 1.5px dashed #2c3346;
  border-radius: var(--r-sm);
  padding: 13px;
  text-align: center;
  color: var(--dim);
  cursor: pointer;
  font-size: 12.5px;
  transition: border-color .15s, color .15s;
}
#refEmpty:hover { border-color: var(--accent); color: var(--text); }
#refChip { position: relative; display: inline-block; }
#refThumb { max-width: 100%; max-height: 110px; border-radius: var(--r-sm); border: 1px solid var(--border); display: block; }
#refRemove {
  position: absolute; top: -7px; right: -7px;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--danger); color: #fff;
  font-size: 11px; line-height: 1;
}

.status-row { display: flex; align-items: center; gap: 11px; }
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--surface-3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}
.spinner.done { animation: none; border-color: var(--ok); }
.spinner.err { animation: none; border-color: var(--danger); }

#cropPreview {
  margin-top: 10px;
  max-width: 100%; max-height: 130px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  display: block;
}

@media (max-width: 900px) {
  .ip-shell { flex-direction: column; }
  .ip-side { flex: 0 0 auto; border-left: none; border-top: 1px solid var(--border-soft); }
}
