/* ── Card Queue ─────────────────────────────────── */

/* Progress bar at top */
.cq-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent, #FD384E);
  transition: width 0.2s ease;
  z-index: 100;
}

/* Header */
.cq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border, #e5e5e5);
}

.cq-header__back {
  color: var(--muted, #666);
  text-decoration: none;
  font-size: 14px;
}

.cq-header__back:hover {
  color: var(--text, #1a1a1a);
}

.cq-header__title {
  font-size: 16px;
  font-weight: 600;
}

.cq-header__counter {
  font-size: 14px;
  color: var(--muted, #666);
}

/* Card area */
.cq-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  padding: 24px 0;
  position: relative;
  overflow: hidden;
}

/* The card */
.cq-card {
  width: 100%;
  max-width: 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 24px;
  border-left: 4px solid #94a3b8;
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
  -webkit-user-select: none;
  user-select: none;
}

/* Status color coding */
.cq-card--overdue  { border-left-color: #ef4444; }
.cq-card--due      { border-left-color: #f59e0b; }
.cq-card--ok       { border-left-color: #10b981; }
.cq-card--snoozed  { border-left-color: #94a3b8; }

/* Slide animations */
.cq-card--slide-left {
  transform: translateX(-120%);
  opacity: 0;
}

.cq-card--slide-right {
  transform: translateX(120%);
  opacity: 0;
}

.cq-card--enter-left {
  transform: translateX(120%);
  opacity: 0;
  transition: none;
}

.cq-card--enter-right {
  transform: translateX(-120%);
  opacity: 0;
  transition: none;
}

/* Swipe flash */
.cq-card--flash-green {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
}

.cq-card--flash-amber {
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4);
}

/* Card content */
.cq-card__name {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.cq-card__firm {
  font-size: 14px;
  color: var(--muted, #666);
  margin-bottom: 12px;
}

.cq-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cq-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
}

/* Stage badge colors */
.cq-badge--lead       { background: #94a3b8; }
.cq-badge--intro      { background: #60a5fa; }
.cq-badge--meeting    { background: #a78bfa; }
.cq-badge--dd         { background: #f59e0b; }
.cq-badge--ic         { background: #f97316; }
.cq-badge--termsheet  { background: #ef4444; }
.cq-badge--closed     { background: #10b981; }

/* Tier badge colors */
.cq-badge--tier-a { background: #10b981; }
.cq-badge--tier-b { background: #60a5fa; }
.cq-badge--tier-c { background: #94a3b8; }

.cq-card__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cq-card__meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.cq-card__meta-label {
  color: var(--muted, #666);
  flex-shrink: 0;
  min-width: 100px;
}

.cq-card__meta-value {
  color: var(--text, #1a1a1a);
}

.cq-card__context {
  font-size: 13px;
  color: var(--muted, #666);
  line-height: 1.4;
  border-top: 1px solid var(--border, #e5e5e5);
  padding-top: 12px;
  margin-top: 4px;
}

/* Snooze picker */
.cq-snooze {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #e5e5e5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cq-snooze__label {
  font-size: 13px;
  color: var(--muted, #666);
}

.cq-snooze__input {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 4px;
  background: #fff;
}

.cq-snooze__btn {
  font-size: 13px;
  padding: 4px 12px;
  border: none;
  border-radius: 4px;
  background: var(--accent, #FD384E);
  color: #fff;
  cursor: pointer;
}

.cq-snooze__btn:hover {
  background: #e0223a;
}

/* Keyboard hint bar */
.cq-hints {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-subtle, #f9f9f9);
  border-top: 1px solid var(--border, #e5e5e5);
  padding: 8px 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 50;
}

.cq-hint {
  font-size: 12px;
  color: var(--muted, #666);
}

.cq-hint__key {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--border, #e5e5e5);
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  font-family: inherit;
  margin-right: 4px;
}

/* Mobile swipe indicators */
.cq-swipe-hint {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-subtle, #f9f9f9);
  border-top: 1px solid var(--border, #e5e5e5);
  padding: 10px 16px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted, #666);
  z-index: 50;
}

/* Empty / done state */
.cq-empty {
  text-align: center;
  padding: 48px 16px;
}

.cq-empty__text {
  font-size: 16px;
  color: var(--muted, #666);
  margin-bottom: 16px;
}

.cq-empty__link {
  font-size: 14px;
  color: var(--accent, #FD384E);
  text-decoration: none;
}

.cq-empty__link:hover {
  text-decoration: underline;
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 767px) {
  .cq-hints {
    display: none;
  }

  .cq-swipe-hint {
    display: flex;
  }

  .cq-card {
    border-radius: 8px;
    padding: 16px;
  }

  .cq-card__name {
    font-size: 18px;
  }
}

@media (min-width: 768px) {
  .cq-swipe-hint {
    display: none;
  }
}
