/* Custom styles – TailwindCSS handles most of the UI */

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #bfdbfe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 0.4rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Step indicator */
.step-bar {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
}
.step-bar .step {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-bottom: 3px solid #e5e7eb;
  color: #9ca3af;
  transition: border-color 0.2s, color 0.2s;
}
.step-bar .step.active {
  border-color: #2563eb;
  color: #2563eb;
}
.step-bar .step.done {
  border-color: #16a34a;
  color: #16a34a;
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-draft     { background: #f3f4f6; color: #6b7280; }
.badge-pending   { background: #fef9c3; color: #854d0e; }
.badge-approved  { background: #dbeafe; color: #1d4ed8; }
.badge-published { background: #dcfce7; color: #15803d; }
.badge-failed    { background: #fee2e2; color: #b91c1c; }

/* Toast notification */
#toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(4rem);
  background: #1f2937;
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  z-index: 9999;
  transition: transform 0.25s ease;
  white-space: nowrap;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Image preview */
#img-preview {
  max-height: 220px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Hashtag chip */
.tag-chip {
  display: inline-flex;
  align-items: center;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0.15rem;
}

/* Char counter warning */
.char-warn { color: #dc2626; }
