/* ------------------------------------------------------------------
   Design intent: a calm, low-stimulus reading environment (this is a
   psychological assessment, not a marketing page). Soft slate/teal
   palette, generous spacing, one accent color used sparingly for
   progress + actions. Large tap targets for mobile.
   ------------------------------------------------------------------ */

:root {
  --ink: #26313a;
  --ink-soft: #5b6b76;
  --paper: #f6f5f1;
  --card: #ffffff;
  --line: #e2e1da;
  --accent: #2f6f66;
  --accent-dark: #234f49;
  --accent-soft: #e7f0ee;
  --warn: #a85c2c;
  --radius: 14px;
  --font-body: 'Noto Sans Armenian', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding: .9rem 0;
}

.topbar .brand {
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}

.page-wrap {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3rem;
}

.card-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(38,49,58,.04);
}

@media (max-width: 480px) {
  .card-panel { padding: 1.25rem 1rem; border-radius: 10px; }
  .page-wrap { padding: 1rem .75rem 2.5rem; }
}

h1.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .35rem;
}

.page-subtitle {
  color: var(--ink-soft);
  font-size: .98rem;
  margin-bottom: 1.5rem;
}

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: 10px;
  transition: background .15s ease, transform .1s ease;
}
.btn-accent:hover:not(:disabled) { background: var(--accent-dark); color: #fff; }
.btn-accent:active:not(:disabled) { transform: scale(.98); }
.btn-accent:disabled {
  background: #c7cdc9;
  border-color: #c7cdc9;
  cursor: not-allowed;
}

/* Looks disabled but stays clickable, so JS can scroll to the missing answer
   instead of the click being silently swallowed (which is what Bootstrap's
   own .disabled utility does via pointer-events: none). */
.btn-accent.is-locked {
  background: #c7cdc9;
  border-color: #c7cdc9;
  cursor: pointer;
  opacity: 1;
}

.btn-outline-accent {
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  border-radius: 10px;
  background: transparent;
}
.btn-outline-accent:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* ---------- Dashboard test cards ---------- */
.test-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 1.1rem 1.2rem;
  margin-bottom: .85rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.test-card__index {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.test-card.is-completed .test-card__index {
  background: var(--accent);
  color: #fff;
}

.test-card__body { flex: 1 1 auto; min-width: 0; }
.test-card__title { font-weight: 600; margin-bottom: .15rem; }
.test-card__status { font-size: .88rem; color: var(--ink-soft); }
.test-card.is-completed .test-card__status { color: var(--accent-dark); }

/* ---------- Progress bar ---------- */
.progress-track {
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width .25s ease;
}

/* ---------- Question list (Likert) ---------- */
.question-block {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}
.question-block:last-child { border-bottom: none; }

.question-block--highlight {
  animation: question-highlight-pulse 1.8s ease;
  border-radius: 10px;
}

@keyframes question-highlight-pulse {
  0%   { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
  70%  { background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
  100% { background: transparent; box-shadow: 0 0 0 0 transparent; }
}

.question-number {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: .1rem .5rem;
  margin-bottom: .5rem;
}

.question-text {
  font-size: 1.02rem;
  line-height: 1.5;
  margin-bottom: .85rem;
}

.likert-options {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.likert-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.likert-option label {
  display: block;
  padding: .6rem .95rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
  user-select: none;
}

.likert-option input[type="radio"]:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}

.likert-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .likert-options { flex-direction: column; }
  .likert-option label { width: 100%; text-align: center; padding: .75rem .5rem; }
}

/* ---------- Event-count "exact number" reveal field ----------
   Shown only when the open-ended top option ("5 կամ ավելի") is selected,
   so the click-friendly buttons stay the default interaction. */
.exact-count-reveal {
  margin-top: .6rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .6rem .75rem;
  animation: reveal-fade .15s ease;
}

@keyframes reveal-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.exact-count-label {
  font-size: .85rem;
  color: var(--accent-dark);
  margin: 0;
  flex: 1 1 auto;
}

.exact-count-reveal .js-count-input {
  width: 5.5rem;
  flex: 0 0 auto;
  text-align: center;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid var(--accent);
  padding: .45rem .4rem;
}

.exact-count-reveal .js-count-input:focus {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(47, 111, 102, .25);
}

@media (max-width: 480px) {
  .exact-count-reveal { flex-wrap: wrap; }
  .exact-count-label { min-width: 100%; }
  .exact-count-reveal .js-count-input { width: 100%; }
}

/* ---------- Save indicator ---------- */
.save-status {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 99px;
  font-size: .85rem;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 40;
}
.save-status.is-visible { opacity: .92; }

/* ---------- Sticky bottom action bar for mobile ---------- */
.bottom-action-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--paper) 65%, transparent);
  padding: 1.25rem 0 .5rem;
  margin-top: .5rem;
}

/* ---------- Instructions / acknowledgement ---------- */
.instructions-list li { margin-bottom: .5rem; line-height: 1.55; }

.form-label { font-weight: 600; color: var(--ink); }
.form-control, .form-select {
  border-radius: 10px;
  border-color: var(--line);
  padding: .65rem .85rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem var(--accent-soft);
}

.badge-locked {
  background: #ece9df;
  color: var(--ink-soft);
}

.footer-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: .82rem;
  padding: 1rem 0 2rem;
}
