/**
 * Zazdorovie — UI component system
 * Design tokens + reusable components (AppLayout, ScreenHeader, QuickActionCard, etc.)
 */

/* ═══ Design tokens ═══ */
:root {
  --zaz-bg-start: #0f172a;
  --zaz-bg-mid: #134e4a;
  --zaz-bg-end: #0c4a4a;
  --zaz-surface: rgba(30, 41, 59, 0.6);
  --zaz-surface-strong: rgba(30, 41, 59, 0.85);
  --zaz-border: rgba(51, 65, 85, 0.8);
  --zaz-teal: #14b8a6;
  --zaz-teal-light: #2dd4bf;
  --zaz-teal-soft: rgba(45, 212, 191, 0.15);
  --zaz-text: #f1f5f9;
  --zaz-text-muted: #94a3b8;
  --zaz-success: #22c55e;
  --zaz-warning: #f59e0b;
  --zaz-danger: #ef4444;
  --zaz-radius: 12px;
  --zaz-radius-lg: 14px;
  --zaz-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ═══ AppLayout ═══ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.app-layout__main {
  flex: 1;
  padding: 1rem;
  padding-bottom: 5rem;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* ═══ ScreenHeader ═══ */
.screen-header {
  margin-bottom: 1.25rem;
}
.screen-header__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--zaz-teal-light);
}
.screen-header__title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--zaz-text);
}
.screen-header__subtitle {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--zaz-text-muted);
  line-height: 1.4;
}

/* ═══ BottomNav (structure; full styles in nav.css) ═══ */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.25rem;
}
.bottom-nav .nav-item {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.7rem;
  padding: 0.4rem 0.25rem;
}

/* ═══ QuickActionCard ═══ */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1rem;
  border-radius: var(--zaz-radius-lg);
  background: var(--zaz-surface);
  border: 1px solid var(--zaz-border);
  text-decoration: none;
  color: var(--zaz-text);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.quick-action-card:hover {
  border-color: var(--zaz-teal-light);
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.15);
}
.quick-action-card--primary {
  background: var(--zaz-teal-soft);
  border-color: rgba(45, 212, 191, 0.5);
}
.quick-action-card__icon {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
  line-height: 1;
}
.quick-action-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.quick-action-card__desc {
  font-size: 0.75rem;
  color: var(--zaz-text-muted);
}

/* ═══ SymptomInput (block) ═══ */
.symptom-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.symptom-input__field {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-radius: var(--zaz-radius);
  border: 1px solid var(--zaz-border);
  background: var(--zaz-surface-strong);
  color: var(--zaz-text);
}
.symptom-input__field::placeholder { color: var(--zaz-text-muted); }
.symptom-input__field:focus {
  outline: none;
  border-color: var(--zaz-teal-light);
  box-shadow: 0 0 0 2px var(--zaz-teal-soft);
}
.symptom-input__add {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--zaz-radius);
  border: 1px solid rgba(45, 212, 191, 0.4);
  background: var(--zaz-teal-soft);
  color: var(--zaz-teal-light);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
}

/* ═══ Chip ═══ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.875rem;
  border: 1px solid var(--zaz-border);
  background: var(--zaz-surface);
  color: var(--zaz-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.chip:hover {
  border-color: var(--zaz-teal-light);
  background: var(--zaz-teal-soft);
}
.chip--selected {
  background: var(--zaz-teal-soft);
  border-color: rgba(45, 212, 191, 0.5);
  color: var(--zaz-text);
}
.chip__remove {
  padding: 0 0.2rem;
  background: none;
  border: none;
  color: var(--zaz-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}
.chip__remove:hover { color: var(--zaz-text); }

/* ═══ BodyMap ═══ */
.body-map {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.body-map__figure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  min-width: 160px;
}
.body-map__zone {
  padding: 0.5rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  background: var(--zaz-teal-soft);
  color: var(--zaz-text);
  border: 1px solid rgba(45, 212, 191, 0.4);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.body-map__zone:hover {
  background: var(--zaz-teal);
  color: var(--zaz-bg-start);
  transform: scale(1.02);
}
.body-map__suggestions {
  flex: 1;
  min-width: 200px;
}

/* ═══ QuestionCard (triage) ═══ */
.question-card {
  padding: 1rem;
  border-radius: var(--zaz-radius-lg);
  background: var(--zaz-surface);
  border: 1px solid var(--zaz-border);
  margin-bottom: 1rem;
}
.question-card__title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--zaz-text);
}
.question-card__subtitle {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--zaz-text-muted);
}

/* ═══ AnswerButtons ═══ */
.answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.answer-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.9375rem;
  border-radius: var(--zaz-radius);
  border: 1px solid var(--zaz-border);
  background: var(--zaz-surface);
  color: var(--zaz-text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.answer-btn:hover {
  border-color: var(--zaz-teal-light);
  background: var(--zaz-teal-soft);
}

/* ═══ ExpandableSection ═══ */
.expandable-section {
  border: 1px solid var(--zaz-border);
  border-radius: var(--zaz-radius);
  background: var(--zaz-surface);
  overflow: hidden;
}
.expandable-section summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--zaz-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.expandable-section summary::-webkit-details-marker { display: none; }
.expandable-section summary::after {
  content: "▶";
  font-size: 0.7rem;
  color: var(--zaz-text-muted);
  transition: transform 0.2s;
}
.expandable-section[open] summary::after { transform: rotate(90deg); }
.expandable-section__body {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--zaz-border);
  font-size: 0.875rem;
  color: var(--zaz-text-muted);
  line-height: 1.5;
}

/* ═══ ReportCard ═══ */
.report-card {
  padding: 1rem;
  border-radius: var(--zaz-radius-lg);
  background: var(--zaz-surface);
  border: 1px solid var(--zaz-border);
  margin-bottom: 1rem;
}
.report-card__meta {
  font-size: 0.75rem;
  color: var(--zaz-text-muted);
  margin-bottom: 0.5rem;
}
.report-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--zaz-text);
}
.report-card__summary {
  font-size: 0.875rem;
  color: var(--zaz-text-muted);
  margin-bottom: 0.75rem;
}
.report-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ═══ Result screen: care level badge ═══ */
.care-level {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.care-level--low {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.care-level--medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.care-level--high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ═══ Fixed CTA button ═══ */
.cta-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.0625rem;
  font-weight: 600;
  border: none;
  border-radius: var(--zaz-radius-lg);
  background: var(--zaz-teal);
  color: var(--zaz-bg-start);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.cta-primary:hover:not(:disabled) {
  background: var(--zaz-teal-light);
  transform: translateY(-1px);
}
.cta-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ═══ Card (generic) ═══ */
.card {
  padding: 1rem;
  border-radius: var(--zaz-radius-lg);
  background: var(--zaz-surface);
  border: 1px solid var(--zaz-border);
  margin-bottom: 1rem;
}
.card__title { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--zaz-text); }
.card__body { font-size: 0.875rem; color: var(--zaz-text-muted); line-height: 1.5; }
