/* ===== Attach Menu Popup ===== */
.plus-btn-wrap {
  position: relative;
}

.attach-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  padding: 4px;
  animation: msSlideDown 0.12s ease;
}

@keyframes msSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.attach-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.12s ease;
}

.attach-menu-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

[data-theme='dark'] .attach-menu {
  background: #1a1a1e;
  border-color: rgba(255,255,255,0.08);
}

[data-theme='dark'] .attach-menu-item:hover {
  background: rgba(255,255,255,0.06);
}

/* ===== Paint Modal ===== */
.paint-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.15s ease;
}

.paint-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 680px;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  animation: slideUp 0.2s ease;
}

[data-theme='dark'] .paint-modal {
  background: #1a1a1e;
  border-color: rgba(255,255,255,0.08);
}

.paint-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.paint-modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.paint-modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.paint-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.paint-action-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.paint-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.paint-close-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.paint-canvas-wrap {
  padding: 12px;
  display: flex;
  justify-content: center;
}

.paint-canvas-wrap canvas {
  border-radius: 8px;
  cursor: crosshair;
  background: #1a1a1e;
}

.paint-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}

.paint-color-picker {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}

.paint-color-picker::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.paint-color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.paint-size-slider {
  flex: 1;
  max-width: 120px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}

.paint-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
}

.paint-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s ease;
}

.paint-tool-btn:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}