/* utilities.css — Animations, spacing helpers, flex utilities */

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════════════════════ */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50%       { transform: scaleY(2.2); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   SPINNER
═══════════════════════════════════════════════════════════ */

.spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-lg {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

/* ═══════════════════════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════════════════════ */

.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
}

/* ═══════════════════════════════════════════════════════════
   FLEX HELPERS
═══════════════════════════════════════════════════════════ */

.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.flex-1       { flex: 1; min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.gap-4        { gap: 4px; }
.gap-6        { gap: 6px; }
.gap-8        { gap: 8px; }
.gap-10       { gap: 10px; }
.gap-12       { gap: 12px; }
.gap-14       { gap: 14px; }
.gap-16       { gap: 16px; }
.gap-20       { gap: 20px; }
.gap-24       { gap: 24px; }

/* ═══════════════════════════════════════════════════════════
   SPACING
═══════════════════════════════════════════════════════════ */

.mb-4  { margin-bottom: 4px; }
.mb-6  { margin-bottom: 6px; }
.mb-8  { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* ═══════════════════════════════════════════════════════════
   TEXT HELPERS
═══════════════════════════════════════════════════════════ */

.text-mono  { font-family: var(--font-mono); }
.text-xs    { font-size: 10px; }
.text-sm    { font-size: 12px; }
.text-base  { font-size: 14px; }
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }
.text-disabled  { color: var(--text-disabled); }
.font-semibold  { font-weight: 600; }
.font-mono      { font-family: var(--font-mono); font-size: 10px; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   SPLIT LAYOUT (Content Gen / Seeding — left config + right output)
═══════════════════════════════════════════════════════════ */

.split-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 1000px) {
  .split-layout { grid-template-columns: 1fr; }
}

.split-left {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.split-right {
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════
   FILTER ROW (All Content)
═══════════════════════════════════════════════════════════ */

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-row .form-input,
.filter-row .form-select {
  width: auto;
  min-width: 100px;
}

.filter-row .search-input {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
}

/* ═══════════════════════════════════════════════════════════
   QUICK ACTIONS ROW (Dashboard)
═══════════════════════════════════════════════════════════ */

.quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   BULK ACTIONS (All Content)
═══════════════════════════════════════════════════════════ */

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--text-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  animation: slideInRight 0.15s ease;
}

.bulk-selected-count {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-right: 4px;
}

.bulk-btn {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.15s;
}
.bulk-btn:hover {
  background: rgba(255,255,255,0.22);
  color: #fff;
}
.bulk-btn-danger {
  color: #ff6b6b;
  border-color: rgba(255,107,107,0.3);
}
.bulk-btn-danger:hover {
  background: rgba(255,107,107,0.15);
  color: #ff6b6b;
}
.bulk-btn-muted {
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.12);
}
.bulk-btn-muted:hover {
  color: rgba(255,255,255,0.85);
}

/* ═══════════════════════════════════════════════════════════
   SEED PROGRESS BLOCK
═══════════════════════════════════════════════════════════ */

.seed-block {
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seed-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.seed-block-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.seed-block-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════
   VISIBILITY HELPERS
═══════════════════════════════════════════════════════════ */

.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Used by router to show/hide pages */
.page-view { display: block; }
.page-view.active { display: block; }
