/* ===================================================================
   CivicAI Prototype — Citizen-facing page styles
   Extends css/styles.css. Do not duplicate tokens/components defined there.
=================================================================== */

/* ---------- Icon spans rendered via mountIcons() ---------- */
[data-icon] svg { display: block; width: 1em; height: 1em; }

/* ---------- Home ---------- */
.home-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5) var(--space-4) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.home-hero { animation: fadeUp 0.5s var(--ease-out) both; }
.home-hero__eyebrow { color: var(--color-primary); font-weight: 700; font-size: var(--text-sm); margin-bottom: var(--space-1); }
.home-hero__title { font-size: var(--text-2xl); margin-bottom: var(--space-2); }

.home-cta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  animation: fadeUp 0.55s var(--ease-out) 0.05s both;
}
.home-cta:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(37, 99, 235, 0.32); }
.home-cta:active { transform: translateY(0) scale(0.98); }
.home-cta__icon {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.home-cta__icon svg { width: 30px; height: 30px; animation: sparklePulse 2.4s ease-in-out infinite; }
@keyframes sparklePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.12); opacity: 0.85; }
}
.home-cta__body { flex: 1; min-width: 0; }
.home-cta__title { display: block; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xl); margin-bottom: 2px; }
.home-cta__sub { display: block; font-size: var(--text-sm); opacity: 0.85; }
.home-cta__chevron { flex-shrink: 0; opacity: 0.9; }
.home-cta__chevron svg { width: 22px; height: 22px; }

.quick-types { animation: fadeUp 0.6s var(--ease-out) 0.1s both; }
.quick-types__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
@media (max-width: 360px) {
  .quick-types__grid { grid-template-columns: repeat(2, 1fr); }
}
.quick-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.quick-type:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--color-border-strong); }
.quick-type:active { transform: translateY(0) scale(0.96); }
.quick-type__icon {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.quick-type__icon svg { width: 20px; height: 20px; }

.my-reports-link {
  display: flex; align-items: center; gap: var(--space-3);
  text-decoration: none;
  animation: fadeUp 0.6s var(--ease-out) 0.15s both;
}
.my-reports-link__icon {
  width: 44px; height: 44px; border-radius: var(--radius-full); flex-shrink: 0;
  background: var(--color-accent-soft); color: var(--color-warning);
  display: flex; align-items: center; justify-content: center;
}
.my-reports-link__icon svg { width: 22px; height: 22px; }
.my-reports-link__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.my-reports-link__title { font-weight: 700; }

.role-switcher {
  text-align: center;
  padding: var(--space-3) var(--space-2) 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-1);
  opacity: 0.75;
}
.role-switcher__link { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }
.role-switcher__link:hover { color: var(--color-primary); }
.role-switcher__link.is-active { color: var(--color-primary); font-weight: 700; text-decoration: none; }

/* ---------- Chat page frame ---------- */
.chat-screen { min-height: 0; }

/* Inline "map art" SVG palette lives in chat.js; frame sizing handled by .map-frame */
.map-frame svg.map-art rect,
.map-frame svg.map-art path { vector-effect: non-scaling-stroke; }

/* icon() is inserted directly (no data-icon wrapper) in these spots, so give
   their SVGs explicit sizing rather than relying on the generic [data-icon] rule. */
.map-pin svg { width: 100%; height: 100%; display: block; }
.map-address svg { width: 16px; height: 16px; flex-shrink: 0; }
.assessment__head svg { width: 18px; height: 18px; flex-shrink: 0; }

.assessment-wrap { width: 100%; }

.chat-summary__row { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-1) 0; font-size: var(--text-sm); }
.chat-summary__row b { font-weight: 700; }
.chat-summary__actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.chat-summary__actions .btn { flex: 1; }

.success-card { text-align: center; padding: var(--space-2); }
.success-card__icon {
  width: 64px; height: 64px; margin: 0 auto var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-success-soft); color: var(--color-success);
  display: flex; align-items: center; justify-content: center;
  animation: popIn var(--dur-slow) var(--ease-spring) both;
}
.success-card__icon svg { width: 34px; height: 34px; }
.success-card__title { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-lg); margin-bottom: var(--space-1); }
.success-card__actions { margin-top: var(--space-4); }

/* ---------- Case tracking ---------- */
.case-summary { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-2); }
.case-summary__icon {
  width: 48px; height: 48px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--color-primary-soft); color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
}
.case-summary__icon svg { width: 24px; height: 24px; }
.case-summary__body { flex: 1; min-width: 0; }
.case-summary__title { font-weight: 700; font-size: var(--text-lg); margin-bottom: 2px; }
.case-summary__id { color: var(--color-muted-light); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.03em; }

.tracking-content { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-5); }

/* ---------- My Reports list ---------- */
.reports-list { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.reports-list .report-card-link { text-decoration: none; animation: fadeUp 0.5s var(--ease-out) both; }
