/* ============================================================
   demo.css — Spotlight demo animation
   Faithful mockup of the actual Queuvo app UI
   ============================================================ */

.demo-container {
  background: #0d0d0d;
  border: 1px solid #1e1e1e;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  /* Fixed height prevents internal animation from causing hero section to reflow.
     overflow: hidden clips anything that momentarily exceeds this. */
  height: 450px;
  font-family: 'Inter', sans-serif;
}

/* ── Fake navbar / window chrome ── */
.demo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #111111;
  border-bottom: 1px solid #1e1e1e;
}

.demo-header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.demo-header-dot:nth-child(1) { background: #ff5f57; }
.demo-header-dot:nth-child(2) { background: #febc2e; }
.demo-header-dot:nth-child(3) { background: #28c840; }

.demo-app-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.demo-logo {
  height: 18px;
  width: 18px;
  object-fit: contain;
}

/* ── App body wrapper ── */
.demo-body {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Stats cards ── */
.demo-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.demo-stat-card {
  background: #111111;
  border: 1px solid #1e1e1e;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}

.demo-stat-number {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform 0.2s ease;
}

.demo-stat-number--blue  { color: #4C6EF5; }
.demo-stat-number--green { color: #2F9E44; }

.demo-stat-number.demo-stat--bump {
  transform: scale(1.3);
}

.demo-stat-label {
  font-size: 10px;
  color: #555555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* ── Queue pills ── */
.demo-queues {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-queue-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #1e1e1e;
  background: #111;
  color: #888;
  font-size: 12px;
  /* Hidden by default — mirrors real app where non-active queues are invisible */
  opacity: 0;
  max-width: 0;
  padding-left: 0;
  padding-right: 0;
  margin-right: 0;
  overflow: hidden;
  transition: opacity 0.35s ease, max-width 0.35s ease,
              padding 0.35s ease, margin 0.35s ease,
              border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

/* Active pill is always visible */
.demo-queue-pill--active {
  opacity: 1;
  max-width: 200px;
  padding-left: 10px;
  padding-right: 10px;
  margin-right: 0;
  border-color: var(--q-color, #4C6EF5);
  background: color-mix(in srgb, var(--q-color, #4C6EF5) 15%, transparent);
  color: #fff;
}

/* Reveal all pills when container has --open class (animated by JS) */
.demo-queues--open .demo-queue-pill:not(.demo-queue-pill--active) {
  opacity: 0.55;
  max-width: 200px;
  padding-left: 10px;
  padding-right: 10px;
  margin-right: 0;
}

/* "About to click" state — JS adds this before switching */
.demo-queue-pill--hover {
  opacity: 0.9 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ccc !important;
}

/* ── Tabs ── */
.demo-tabs {
  display: flex;
  border-bottom: 1px solid #1e1e1e;
  margin: 0 -16px;
  padding: 0 16px;
}

.demo-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #555;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 6px 14px 8px;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: -1px;
}

.demo-tab--active {
  color: #ffffff;
  border-bottom-color: var(--demo-spotlight-color, #4C6EF5);
  transition: border-bottom-color 0.4s ease;
}

.demo-tab-count {
  font-size: 10px;
  opacity: 0.5;
}

/* ── Task items ── */
.demo-tasks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.demo-task {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid transparent;
  cursor: default;
  /* Dimmer than the real app (35%) to look right in the demo card context */
  opacity: 0.20;
  transition: opacity 0.3s ease;
}

.demo-task:not(.demo-task--spotlight):hover {
  opacity: 0.55;
}

/* Spotlight — mirrors real .todo-item--spotlight exactly */
.demo-task--spotlight {
  opacity: 1;
  background: rgba(255, 255, 255, 0.03);
  border-left-color: var(--demo-spotlight-color, #4C6EF5);
  border-radius: 8px;
  padding: 14px 12px;
  margin-bottom: 6px;
  transition: border-left-color 0.4s ease, background 0.4s ease;
}

.demo-checkbox {
  border-radius: 50%;
  border: 2px solid #333;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.demo-task--spotlight .demo-checkbox {
  width: 20px;
  height: 20px;
  border-color: var(--demo-spotlight-color, #4C6EF5);
  transition: border-color 0.4s ease;
}

.demo-task-text {
  font-size: 15px;
  color: #ffffff;
  font-weight: 400;
  position: relative;
}

.demo-task--spotlight .demo-task-text {
  font-size: 20px;
  font-weight: 500;
}

.demo-task-text::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0%;
  height: 1px;
  background: #888888;
  transform: translateY(-50%);
  transition: width 0.3s ease;
}

/* ── Animation state classes (toggled by JS) ── */

.demo-task--completing .demo-checkbox {
  background: var(--demo-spotlight-color, #4C6EF5);
  border-color: var(--demo-spotlight-color, #4C6EF5);
}
.demo-task--completing .demo-task-text::after {
  width: 100%;
}
.demo-task--completing .demo-task-text {
  color: #555555;
}

.demo-task--exiting {
  opacity: 0 !important;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease !important;
}

/* After the slide-out animation completes, collapse the row so it vanishes from the list */
.demo-task--done {
  opacity: 0 !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  transform: translateX(-16px);
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease !important;
}

.demo-task--rising {
  transition: opacity 0.6s ease !important;
}

/* ── Caption ── */
@keyframes captionPulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1;   }
}

.demo-caption {
  text-align: center;
  font-size: 13px;
  color: #555555;
  margin-top: 16px;
  font-style: italic;
  animation: captionPulse 4s ease-in-out infinite;
}
