/* ── Foreclosure Decoded — Motion Generator ────────────────────────────────
   Companion to styles.css. All vars, resets, and global typography live
   in styles.css — this file contains only motions-page-specific rules.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Action / filter bar ──────────────────────────────────────────────────── */
.motions-action-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 90;
}
.motions-action-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 1rem;
}
@media (max-width: 1024px) { .motions-action-inner { padding: 0 24px; } }
@media (max-width: 640px)  {
  .motions-action-inner { padding: 0 16px; }
  .motions-action-label { display: none; }
}
@media (max-width: 480px) {
  .motions-action-inner { padding: 0.35rem 16px; min-height: auto; }
}
.motions-action-label {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.motions-pills {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
  padding-right: 16px;
}
.motions-pills::-webkit-scrollbar { display: none; }
.motions-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--surface-alt);
  color: var(--text-muted);
  transition: all 0.12s;
  line-height: 1;
}
.motions-pill:hover  { border-color: var(--teal); color: var(--teal); background: rgba(31,122,114,.06); }
.motions-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── Page layout ──────────────────────────────────────────────────────────── */
.motions-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 32px 4rem;
}
@media (max-width: 1024px) { .motions-page { padding: 1.25rem 24px 3rem; } }
@media (max-width: 640px)  { .motions-page { padding: 1rem 16px 2.5rem; } }
.motions-columns {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 960px) { .motions-columns { grid-template-columns: 1fr; } }
.motions-main { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }

/* ── AI disclosure notice ─────────────────────────────────────────────────── */
.disclosure-notice {
  background: var(--surface-alt);
  border-left: 3px solid var(--amber);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
}
.disclosure-notice h4 {
  margin: 0 0 3px;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Poppins', system-ui, sans-serif;
}
.disclosure-notice p { margin: 0; font-size: 0.77rem; color: var(--text); line-height: 1.55; }

/* ── Motion card list ─────────────────────────────────────────────────────── */
.motion-card-list { display: flex; flex-direction: column; gap: 0.75rem; }

.motion-row-card {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s, transform 0.15s;
}
.motion-row-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.motion-row-card.hidden { display: none; }

.motion-thumb {
  flex: 0 0 110px;
  background: linear-gradient(135deg, var(--surface-alt) 0%, #e8eaee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
}
.motion-body {
  flex: 1;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.motion-meta-row { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 4px; flex-wrap: wrap; }
.motion-chip {
  display: inline-flex;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem;
  border-radius: 20px;
}
/* Category type chips */
.motion-chip-extension { background: rgba(184,134,11,.13); color: #7a6008;  border: 1px solid rgba(184,134,11,.25); }
.motion-chip-response  { background: rgba(31,122,114,.12); color: #145f58;  border: 1px solid rgba(31,122,114,.25); }
.motion-chip-emergency { background: rgba(185,28,28,.1);   color: #b91c1c;  border: 1px solid rgba(185,28,28,.22); }
.motion-chip-post      { background: rgba(60,97,135,.12);  color: #2d5a8e;  border: 1px solid rgba(60,97,135,.25); }
.motion-chip-default   { background: var(--surface-alt);   color: var(--text-muted); border: 1px solid var(--border); }

/* Access tier badges */
.motion-tier-bundle  { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0.15rem 0.45rem; border-radius: 4px; background: rgba(184,134,11,.13); color: #7a6008; border: 1px solid rgba(184,134,11,.3); }
.motion-tier-premium { font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0.15rem 0.45rem; border-radius: 4px; background: rgba(30,43,74,.09);   color: var(--navy);  border: 1px solid rgba(30,43,74,.2); }
.motion-title   { font-size: 0.9rem; font-weight: 800; color: var(--navy); line-height: 1.35; margin: 0 0 3px; font-family: 'Poppins', system-ui, sans-serif; }
.motion-excerpt { font-size: 0.76rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 10px; }
.motion-footer  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--surface-alt);
  gap: 0.75rem;
  flex-wrap: wrap;
}
.motion-deadline { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }
.motion-gen-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 5px 13px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Inter', system-ui, sans-serif;
  transition: opacity .15s;
}
.motion-gen-btn:hover { opacity: .85; }

@media (max-width: 500px) {
  .motion-row-card { flex-direction: column; }
  .motion-thumb    { flex: none; width: 100%; height: 80px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* Empty / loading state */
.motions-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.motions-sidebar { display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 68px; }
@media (max-width: 960px) { .motions-sidebar { position: static; } }

.ls-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ls-card-head {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1rem;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}
.ls-card-body { padding: 0.4rem 0.5rem; }

.draft-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 6px;
  text-decoration: none;
  border-bottom: 1px solid var(--surface-alt);
  transition: background .12s;
}
.draft-row:last-child { border-bottom: none; }
.draft-row:hover { background: var(--surface-alt); }
.draft-title { font-size: 0.78rem; font-weight: 700; color: var(--navy); }
.draft-meta  { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--text-muted); }

.vault-hint {
  margin: 6px 8px;
  padding: 10px 12px;
  font-size: 0.74rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-radius: 6px;
  border: 1px dashed var(--border);
  line-height: 1.5;
}

.filing-tip-body { padding: 12px 14px; font-size: 0.76rem; line-height: 1.6; color: var(--text); }
.filing-tip-body strong { display: block; font-weight: 700; color: var(--navy); margin-bottom: 3px; }

/* ── Questionnaire modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.modal-header h2 { margin: 0; font-size: 1.05rem; }
.modal-subtitle { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 20px; }
.modal-ai-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #92400e;
  margin-bottom: 20px;
  line-height: 1.55;
}
