/* ═══════════════════════════════════════════════════════════════════════
   Animation Sandbox — Shared UI Styles
   Analytic Endeavors Inc. | analyticendeavors.com

   Common layout and component styles used across all animation sandbox
   pages and embed pages. Import AFTER variables.css and base.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Sandbox Header ─────────────────────────────────────── */
.sandbox-header {
  padding: 3rem 2rem 2rem;
  border-bottom: 1px solid var(--border, rgba(0, 153, 153, 0.2));
  background: var(--bg-dark, #0c111c);
}

.sandbox-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sandbox-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal, #009999);
  margin-bottom: 0.35rem;
  display: block;
}

.sandbox-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.sandbox-meta {
  font-size: 0.78rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sandbox-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.sandbox-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.25);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 140, 66, 0.85);
  margin-top: 1rem;
}

.anim-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(0, 153, 153, 0.1);
  border: 1px solid rgba(0, 153, 153, 0.25);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--teal, #009999);
  font-weight: 600;
  align-self: center;
  white-space: nowrap;
}

/* ─── Animations List ─────────────────────────────────────── */
.animations-list {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* ─── Individual Animation Section ───────────────────────── */
.anim-section {
  margin-bottom: 2rem;
  border: 1px solid var(--border, rgba(0, 153, 153, 0.2));
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg, rgba(15, 25, 45, 0.8));
}

.anim-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border, rgba(0, 153, 153, 0.12));
  background: rgba(0, 0, 0, 0.2);
  gap: 1rem;
}

.anim-section-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.anim-number {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.anim-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Status Badges ───────────────────────────────────────── */
.anim-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.anim-status.active {
  color: rgba(0, 184, 184, 0.9);
  background: rgba(0, 184, 184, 0.1);
  border: 1px solid rgba(0, 184, 184, 0.25);
}

.anim-status.testing {
  color: rgba(0, 184, 184, 0.9);
  background: rgba(0, 184, 184, 0.1);
  border: 1px solid rgba(0, 184, 184, 0.25);
}

.anim-status.draft {
  color: rgba(255, 140, 66, 0.85);
  background: rgba(255, 140, 66, 0.1);
  border: 1px solid rgba(255, 140, 66, 0.22);
}

.anim-status.ready {
  color: rgba(80, 210, 120, 0.9);
  background: rgba(80, 210, 120, 0.08);
  border: 1px solid rgba(80, 210, 120, 0.2);
}

.anim-status.empty {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Animation Preview Area ──────────────────────────────── */
.anim-preview {
  padding: 0.75rem 1.5rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient, linear-gradient(135deg, rgba(0, 93, 124, 0.05) 0%, rgba(0, 153, 153, 0.05) 100%));
}

/* ─── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  max-width: 400px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: 0.3;
  stroke: currentColor;
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.empty-state p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ─── Animation Root (click-to-advance container) ─────────── */
.ae-anim-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  user-select: none;
  width: 100%;
}

/* ─── Stage Footer Controls ───────────────────────────────── */
.ae-anim-footer {
  padding: 0.75rem 1rem 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  width: 100%;
}

.ae-stage-label {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted, rgba(255, 255, 255, 0.55));
  text-align: center;
  min-height: 2.4em;
  max-width: 620px;
}

.ae-hint {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.28);
  font-style: italic;
}

/* ─── Nav Row (prev / pips / next) ───────────────────────── */
.ae-nav-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.ae-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0, 153, 153, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--teal, #009999);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}

.ae-nav-btn:hover {
  background: rgba(0, 153, 153, 0.1);
  border-color: rgba(0, 153, 153, 0.5);
}

.ae-nav-btn svg {
  display: block;
}

.ae-stages-row {
  display: flex;
  gap: 6px;
}

.ae-stage-pip {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.3s;
}

.ae-stage-pip.done { background: rgba(0, 184, 184, 0.7); }
.ae-stage-pip.current { background: rgba(0, 184, 184, 1); }

.ae-reset-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid rgba(0, 153, 153, 0.4);
  border-radius: 20px;
  background: transparent;
  color: var(--teal, #009999);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: none;
}

.ae-reset-btn:hover {
  background: rgba(0, 153, 153, 0.1);
  border-color: rgba(0, 153, 153, 0.6);
}

/* ─── Light Mode ──────────────────────────────────────────── */
[data-theme="light"] .sandbox-header {
  background: var(--bg-light, #f5f7fa);
  border-color: rgba(0, 93, 124, 0.15);
}

[data-theme="light"] .anim-section {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 93, 124, 0.15);
}

[data-theme="light"] .anim-section-header {
  background: rgba(0, 153, 153, 0.03);
  border-color: rgba(0, 93, 124, 0.1);
}

[data-theme="light"] .anim-number {
  background: rgba(0, 93, 124, 0.08);
  color: rgba(0, 93, 124, 0.6);
}

[data-theme="light"] .anim-status.empty {
  background: rgba(0, 93, 124, 0.05);
  border-color: rgba(0, 93, 124, 0.2);
  color: rgba(0, 93, 124, 0.6);
}

[data-theme="light"] .anim-preview {
  background: linear-gradient(135deg, rgba(0, 153, 153, 0.03) 0%, rgba(0, 93, 124, 0.03) 100%);
}

[data-theme="light"] .empty-state {
  color: rgba(0, 61, 86, 0.5);
}

[data-theme="light"] .empty-state h3 {
  color: var(--text-primary, #003D56);
}

[data-theme="light"] .ae-stage-label {
  color: rgba(0, 40, 80, 0.65);
}

[data-theme="light"] .ae-hint {
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ae-reset-btn {
  border-color: rgba(0, 100, 100, 0.4);
  color: rgba(0, 100, 100, 0.75);
}

[data-theme="light"] .ae-reset-btn:hover {
  background: rgba(0, 100, 100, 0.08);
}

[data-theme="light"] .ae-nav-btn {
  border-color: rgba(0, 100, 100, 0.3);
  color: rgba(0, 100, 100, 0.75);
}

[data-theme="light"] .ae-nav-btn:hover {
  background: rgba(0, 100, 100, 0.08);
  border-color: rgba(0, 100, 100, 0.5);
}
