/* Queue & Calendar (mockup 04) — view-specific overrides. Reuses .card,
   .chip, .badge, .tabs/.tab, .btn* from components.css; only queue-specific
   layout lives here. Loaded after views.css so it can restyle the shared
   .goals-card/.queue-item/.canned-* rules without editing that frozen file. */

.platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
}

/* --- Goals card --- */

.goals-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.goals-card-title {
  margin: 0;
}

.goals-streak-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  background: var(--bg-sunken);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
}

.goals-streak-value {
  font-weight: 700;
}

.goal-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.goal-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.goal-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--bg-sunken);
  font-size: 1.1rem;
}

.goal-row-body {
  flex: 1;
  min-width: 0;
}

.goal-row-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
}

.goal-met {
  color: var(--success-ink);
}

.goal-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 2px 0 var(--space-2);
}

.goal-stepper {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.goal-stepper-btn {
  padding: 0.15em 0.65em;
  line-height: 1;
}

.goal-stepper-value {
  font-weight: 700;
  min-width: 1.5em;
  text-align: center;
  display: inline-block;
}

.goals-reset-note {
  text-align: right;
  margin-top: var(--space-3);
}

/* --- Toolbar / filters --- */

.queue-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.queue-toolbar .tabs {
  border-bottom: none;
  margin-bottom: 0;
}

.queue-status-filter {
  margin-bottom: var(--space-4);
}

/* --- List rows --- */

.queue-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.queue-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  flex-wrap: wrap;
}

.queue-item-main {
  flex: 1 1 260px;
  min-width: 0;
}

.queue-item-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  flex-wrap: wrap;
}

.queue-item-schedule {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.queue-item-actions {
  display: flex;
  gap: var(--space-2);
  flex: none;
  flex-wrap: wrap;
}

/* manual-workflow lives in the frozen views.css with `.manual-done-row
   .input { flex: 1 }` and no min-width override — flex items default to
   min-width:auto, so the URL input refuses to shrink below its content
   width and pushes past the card edge on narrow screens. */
.manual-workflow {
  min-width: 0;
}

.manual-done-row {
  flex-wrap: wrap;
}

.manual-done-row .input {
  min-width: 0;
}

@media (max-width: 700px) {
  .queue-item-side {
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
  }
}

/* components.css defines every other badge-status-* color but has no rule
   for 'blocked' (not in POST_STATUSES — see queue.js STATUS_LABEL comment),
   so it fell back to the browser's unstyled default. Added here rather
   than editing the frozen shared file. */
.badge-status-blocked {
  background: color-mix(in srgb, var(--coral) 20%, transparent);
  color: var(--coral-ink);
}

/* A practice (dry-run) publish is NOT a publish. Muted amber with a dashed
   edge so it reads at a glance as "held back", never mistakable for the
   solid green of a real .badge-status-published sitting in the same row. */
.badge-status-practice {
  background: color-mix(in srgb, var(--sunny) 12%, transparent);
  color: var(--sunny-ink);
  border: 1px dashed color-mix(in srgb, var(--sunny-ink) 45%, transparent);
}

/* --- Attach-state note (b-roll wave: persistent pending/blocked indicator,
   the toast at attach time doesn't survive a page reload) --- */

.attach-note {
  margin: var(--space-2) 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.35em 0.7em;
  display: inline-block;
}

.attach-note-waiting {
  color: var(--sunny-ink);
  background: color-mix(in srgb, var(--sunny) 20%, transparent);
}

.attach-note-blocked {
  color: var(--coral-ink);
  background: color-mix(in srgb, var(--coral) 14%, transparent);
}

.queue-footnote {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* --- Posting status card (mockup 04) --- */

.queue-top-row {
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.queue-top-row .goals-card {
  flex: 1 1 420px;
}

.posting-status-card {
  flex: 0 1 260px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.posting-status-icon {
  flex: none;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--teal-ink);
  font-size: 1.4rem;
}

.posting-status-card-paused .posting-status-icon {
  color: var(--sunny-ink);
}

.posting-status-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: flex-start;
}

.posting-status-headline {
  margin: 0;
  font-weight: 700;
}

.posting-status-sub {
  margin: 0 0 var(--space-1);
}

.posting-status-body .btn {
  margin-top: var(--space-1);
}

/* Which campaign a draft came from (S5) — a batch of campaign posts must be
   recognisable at a glance among unrelated ones. */
.queue-campaign-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--violet-ink);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  margin-bottom: 6px;
}
.queue-reschedule {
  width: 100%;
}

.queue-reschedule summary {
  cursor: pointer;
  color: var(--text-muted);
}

.queue-reschedule-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
