/* Mask Painter modal — overlay canvas painting for inpaint masks. */

.mask-painter__overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 12, 16, 0.72);
}

.mask-painter__panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 10px;
  background: var(--panel-bg, #101a20);
  border: 1px solid var(--panel-border, #233038);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  max-width: 92vw;
}

.mask-painter__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mask-painter__title {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary, #e8f0f2);
}

.mask-painter__hint {
  flex: 1;
  font-size: 11px;
  color: var(--text-secondary, #8aa0a8);
}

.mask-painter__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary, #8aa0a8);
  cursor: pointer;
}

.mask-painter__icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #e8f0f2);
}

.mask-painter__empty {
  padding: 36px 24px;
  font-size: 12px;
  color: var(--text-secondary, #8aa0a8);
  text-align: center;
  max-width: 380px;
}

.mask-painter__stage {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  align-self: center;
}

.mask-painter__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
}

.mask-painter__strokes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  cursor: crosshair;
  touch-action: none;
}

.mask-painter__toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mask-painter__tool {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--panel-border, #233038);
  background: transparent;
  color: var(--text-secondary, #8aa0a8);
  cursor: pointer;
}

.mask-painter__tool:hover {
  color: var(--text-primary, #e8f0f2);
}

.mask-painter__tool--active {
  background: rgba(102, 187, 255, 0.14);
  border-color: rgba(102, 187, 255, 0.5);
  color: var(--text-primary, #e8f0f2);
}

.mask-painter__size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary, #8aa0a8);
}

.mask-painter__size input {
  width: 110px;
}

.mask-painter__spacer {
  flex: 1;
}

.mask-painter__cancel {
  padding: 6px 12px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid var(--panel-border, #233038);
  background: transparent;
  color: var(--text-secondary, #8aa0a8);
  cursor: pointer;
}

.mask-painter__save {
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: #4da3ff;
  color: #06121a;
  cursor: pointer;
}

.mask-painter__save:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Inspector section */
.mask-painter__inspector-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.mask-painter__paint-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(102, 187, 255, 0.5);
  background: rgba(102, 187, 255, 0.12);
  color: var(--text-primary, #e8f0f2);
  cursor: pointer;
}

.mask-painter__paint-btn:hover {
  background: rgba(102, 187, 255, 0.2);
}

.mask-painter__status {
  font-size: 11px;
  color: var(--text-secondary, #8aa0a8);
}

.mask-painter__thumb {
  margin-top: 8px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid var(--panel-border, #233038);
}
