/*
 * MC Pending Ledger — bare-minimum styles (Step 5)
 *
 * This file is NOT the Step 7 polish CSS. It exists so the Step 5 SPA page
 * is visibly functional. Step 7 will refine typography, dark-mode tuning,
 * responsive breakpoints, and motion. Everything here uses the .pending-*
 * namespace so it doesn't collide with MC's existing chat / bugs / dashboard
 * styles or with Teams Portal's .action-* palette.
 *
 * Plan reference: /opt/mission-control/docs/plans/MC_PENDING_LEDGER_PAGE_v1.md
 */

/* ── Page layout ─────────────────────────────────────────── */

section[data-page="pending"] .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

section[data-page="pending"] .page-header h1 {
  margin: 0;
  font-size: 1.5rem;
}

section[data-page="pending"] .page-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#pendingCountBadge {
  font-size: 0.85rem;
  color: #9ca3af;
}

.pending-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pending-filter-pill {
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.pending-filter-pill.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.pending-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pending-empty-state {
  padding: 2rem;
  text-align: center;
  color: #9ca3af;
  border: 1px dashed #374151;
  border-radius: 8px;
}

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

.pending-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.pending-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.pending-card-title {
  margin: 0;
  font-size: 1.05rem;
  color: #f9fafb;
}

.pending-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.pending-card-status {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: #1f2937;
  color: #d1d5db;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
}

.pending-status-open { background: #1e3a8a; color: #dbeafe; }
.pending-status-in_progress { background: #78350f; color: #fde68a; }
.pending-status-awaiting_more_info { background: #3f3f46; color: #e4e4e7; }
.pending-status-closed { background: #1f2937; color: #6b7280; }
.pending-status-resolved { background: #064e3b; color: #a7f3d0; }

.pending-card-body {
  margin: 0.5rem 0 0.75rem 0;
  color: #d1d5db;
  font-size: 0.9rem;
  line-height: 1.5;
}

.pending-card-summary {
  margin-bottom: 0.35rem;
}

.pending-card-ask {
  color: #e5e7eb;
}

.pending-card-ask strong {
  color: #93c5fd;
}

.pending-card-widgets {
  border-top: 1px solid #1f2937;
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pending-card-fallback,
.pending-card-placeholder {
  font-size: 0.85rem;
  color: #9ca3af;
  font-style: italic;
}

/* ── Action groups (renderer output) ─────────────────────── */

.pending-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pending-action-group-radio,
.pending-action-group-checkbox {
  flex-direction: column;
  align-items: flex-start;
}

.pending-action-prompt {
  width: 100%;
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 0.2rem;
}

.pending-action-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: #fff;
  font-weight: 500;
}

.pending-action-btn-primary   { background: #3b82f6; }
.pending-action-btn-primary:hover   { background: #2563eb; }
.pending-action-btn-secondary { background: #4b5563; }
.pending-action-btn-secondary:hover { background: #374151; }
.pending-action-btn-danger    { background: #ef4444; }
.pending-action-btn-danger:hover    { background: #dc2626; }
.pending-action-btn-success   { background: #10b981; }
.pending-action-btn-success:hover   { background: #059669; }

.pending-action-radio-options,
.pending-action-checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pending-action-radio-option,
.pending-action-check-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: #e5e7eb;
  cursor: pointer;
}

.pending-action-submit {
  align-self: flex-start;
  margin-top: 0.35rem;
  background: #3b82f6;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  cursor: pointer;
}
.pending-action-submit:hover:not(:disabled) { background: #2563eb; }
.pending-action-submit:disabled {
  background: #374151;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ── Inline destructive confirm ──────────────────────────── */

.pending-action-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: #1f2937;
  border: 1px solid #ef4444;
  border-radius: 6px;
}

.pending-action-confirm-prompt {
  font-size: 0.88rem;
  color: #fecaca;
}

.pending-action-confirm-row {
  display: flex;
  gap: 0.4rem;
}

.pending-action-confirm-yes,
.pending-action-confirm-no {
  border-radius: 5px;
  padding: 0.3rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
  border: 1px solid transparent;
  color: #fff;
}

.pending-action-confirm-yes { background: #ef4444; }
.pending-action-confirm-yes:hover { background: #dc2626; }
.pending-action-confirm-no  { background: #4b5563; }
.pending-action-confirm-no:hover  { background: #374151; }

/* ── Q6 awaiting_more_info chip ──────────────────────────── */

.pending-awaiting-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  background: #374151;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  color: #f3f4f6;
  font-size: 0.88rem;
}

.pending-awaiting-icon {
  font-size: 1.1rem;
}

.pending-awaiting-text {
  flex: 1;
}

.pending-cancel-request {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}
