/* R12 — Painter UX styles. */

.painter-offer {
  margin: 10px 0 4px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed #c084fc;
  background: linear-gradient(135deg, rgba(192, 132, 252, 0.06), rgba(45, 212, 191, 0.06));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.painter-offer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 9999px;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #c084fc;
  color: #fff;
  box-shadow: 0 1px 3px rgba(192, 132, 252, 0.3);
  transition: transform 100ms ease, box-shadow 100ms ease, background 100ms ease;
}
.painter-offer-btn:hover { background: #b06fef; transform: translateY(-1px); box-shadow: 0 3px 9px rgba(192, 132, 252, 0.4); }
.painter-offer-btn:active { transform: translateY(0); }
.painter-offer-btn:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }
.painter-emoji { font-size: 1.1em; }

.painter-offer-label {
  font-size: 0.78em;
  color: #4b5563;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 2px;
}
.painter-offer-sub {
  font-size: 0.86em;
  color: #374151;
  line-height: 1.45;
  font-style: italic;
  background: rgba(255, 255, 255, 0.55);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(192, 132, 252, 0.2);
  white-space: pre-wrap;
  word-break: break-word;
}

.painter-offer-alt {
  background: transparent;
  border: 0;
  padding: 0;
  color: #2563eb;
  font: inherit;
  font-size: 0.85em;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
}
.painter-offer-alt:hover { color: #1d4ed8; }

/* Painter bubble — generating + review states */
.painter-bubble {
  margin: 10px 0 4px 0;
  padding: 12px;
  border-radius: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 220px;
}

.painter-generating { align-items: center; }
.painter-spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  border-top-color: #c084fc;
  animation: painter-spin 0.9s linear infinite;
}
@keyframes painter-spin { to { transform: rotate(360deg); } }
.painter-status { color: #6b7280; font-size: 0.9em; }

.painter-img {
  display: block;
  max-width: 100%;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
}

.painter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.painter-action {
  flex: 1 1 90px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  transition: background 100ms ease, transform 100ms ease;
}
.painter-action:hover { transform: translateY(-1px); }
.painter-approve { background: #d1fae5; border-color: #86efac; color: #065f46; }
.painter-approve:hover { background: #a7f3d0; }
.painter-decline { background: #fee2e2; border-color: #fca5a5; color: #7f1d1d; }
.painter-decline:hover { background: #fecaca; }
.painter-retry { background: #ede9fe; border-color: #c4b5fd; color: #4c1d95; }
.painter-retry:hover { background: #ddd6fe; }
.painter-action:focus-visible { outline: 2px solid #f97316; outline-offset: 2px; }

.painter-busy { opacity: 0.6; pointer-events: none; }
.painter-approved { background: #ecfdf5; border-color: #bbf7d0; }
.painter-declined { background: #fef2f2; border-color: #fecaca; padding: 14px; }
.painter-declined-text { color: #7f1d1d; font-size: 0.9em; text-align: center; }
.painter-saved-note { color: #065f46; font-size: 0.85em; font-weight: 600; }

.painter-failed {
  background: #fef2f2;
  border-color: #fecaca;
  align-items: flex-start;
}
.painter-fail-text { color: #7f1d1d; font-weight: 600; font-size: 0.9em; }
.painter-fail-hint { color: #991b1b; font-size: 0.85em; }
.painter-fail-action {
  padding: 8px 14px;
  border-radius: 9999px;
  border: 0;
  background: #c084fc;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.painter-fail-action:hover { background: #b06fef; }

/* Toast */
.painter-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1f2937;
  color: #f9fafb;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 0.85em;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 9999;
  max-width: min(86vw, 480px);
  text-align: center;
}
.painter-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 820px) {
  .painter-bubble { min-width: 160px; }
  .painter-action { font-size: 0.85em; min-height: 44px; } /* touch target */
}
