/* ==========================================================================
   TruMeds - Intake Questionnaire
   Uses the same tokens as css/style.css
   ========================================================================== */

:root {
  --primary-dark: #233e36;
  --primary-forest: #28443b;
  --primary-emerald: #2f4f46;
  --accent-mint: #25a176;
  --accent-sage: #577c6e;
  --hover-fill: #5d8d78;
  --ticker-bg: #dfd7cb;
  --light-bg: #f5f7f6;
  --tint: #eaf1ed;
  --card-bg: #ffffff;
  --border-color: #d9e3de;
  --text-main: #111111;
  --text-muted: #52666d;
  --error: #b42318;
  --font-heading: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.qz-page {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--tint) 0%, var(--light-bg) 320px);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.qz-container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

.qz-narrow {
  max-width: 640px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.qz-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
}

.qz-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.qz-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.qz-header-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.qz-header-note i {
  color: var(--accent-mint);
}

/* --------------------------------------------------------------------------
   Progress
   -------------------------------------------------------------------------- */
.qz-progress {
  padding: 24px 0 8px;
}

.qz-sections {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.qz-sections li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.qz-sec-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-color);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.qz-sections li.is-active {
  color: var(--primary-forest);
}

.qz-sections li.is-active .qz-sec-num {
  border-color: var(--primary-forest);
  background: var(--primary-forest);
  color: #ffffff;
}

.qz-sections li.is-done .qz-sec-num {
  border-color: var(--accent-mint);
  background: var(--accent-mint);
  color: #ffffff;
}

.qz-bar {
  height: 6px;
  border-radius: 99px;
  background: #dbe5e0;
  overflow: hidden;
}

.qz-bar span {
  display: block;
  height: 100%;
  width: 4%;
  border-radius: inherit;
  background: var(--accent-mint);
  transition: width 0.4s ease;
}

/* --------------------------------------------------------------------------
   Card & step
   -------------------------------------------------------------------------- */
.qz-main {
  padding: 16px 0 48px;
}

.qz-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(35, 62, 54, 0.08);
  padding: 36px 40px 40px;
}

.qz-step,
.qz-end {
  animation: qz-in 0.3s ease;
}

@keyframes qz-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.qz-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  font: 600 15px var(--font-body);
  cursor: pointer;
}

.qz-back:hover {
  color: var(--primary-forest);
}

.qz-title {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-dark);
  outline: none;
}

.qz-sub {
  margin: 0 0 4px;
  color: var(--text-muted);
}

.qz-body {
  margin-top: 24px;
}

.qz-label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
  font-size: 15px;
}

.qz-muted {
  color: var(--text-muted);
  font-weight: 400;
}

.qz-field {
  margin-top: 20px;
}

.qz-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.qz-grid-2 .qz-field {
  margin-top: 0;
}

.qz-nail-counts {
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Inputs
   -------------------------------------------------------------------------- */
.qz-input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-main);
  font: 16px var(--font-body);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.qz-input::placeholder {
  color: #9aa8a3;
}

.qz-input:focus {
  outline: none;
  border-color: var(--accent-sage);
  box-shadow: 0 0 0 4px rgba(37, 161, 118, 0.15);
}

.qz-input--lg {
  font-size: 20px;
  letter-spacing: 1px;
}

.qz-textarea {
  min-height: 110px;
  resize: vertical;
}

.qz-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2328443b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

.qz-select:invalid,
.qz-select option[value=""] {
  color: #9aa8a3;
}

.qz-select option {
  color: var(--text-main);
}

.qz-hint {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.qz-hint.is-error,
.qz-error {
  color: var(--error);
}

.qz-error {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Single-choice buttons
   -------------------------------------------------------------------------- */
.qz-choices {
  display: grid;
  gap: 12px;
}

.qz-choices--row {
  grid-template-columns: 1fr 1fr;
}

.qz-choices--row3 {
  grid-template-columns: repeat(3, 1fr);
}

.qz-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text-main);
  font: 600 16px var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.1s ease;
}

.qz-choices--row .qz-choice,
.qz-choices--row3 .qz-choice {
  justify-content: center;
  text-align: center;
}

.qz-choices--row .qz-choice-arrow,
.qz-choices--row3 .qz-choice-arrow {
  display: none;
}

.qz-choice small,
.qz-check small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 400;
}

.qz-choice-arrow {
  color: #a8b8b1;
  font-size: 13px;
}

.qz-choice:hover {
  border-color: var(--accent-sage);
  background: #fbfdfc;
}

.qz-choice:active {
  transform: scale(0.99);
}

.qz-choice[aria-pressed="true"] {
  border-color: var(--primary-forest);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px var(--primary-forest);
}

.qz-choice[aria-pressed="true"] .qz-choice-arrow {
  color: var(--primary-forest);
}

.qz-choice:focus-visible,
.qz-back:focus-visible,
.qz-btn:focus-visible {
  outline: 3px solid rgba(37, 161, 118, 0.45);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Checkboxes (multi-select)
   -------------------------------------------------------------------------- */
.qz-checks {
  display: grid;
  gap: 10px;
}

.qz-group {
  margin: 14px 0 2px;
  color: var(--accent-sage);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.qz-group:first-child {
  margin-top: 0;
}

.qz-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: 56px;
  padding: 15px 18px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  background: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.qz-check:hover {
  border-color: var(--accent-sage);
}

.qz-check.is-on {
  border-color: var(--primary-forest);
  background: var(--tint);
}

.qz-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.qz-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid #b7c6bf;
  border-radius: 6px;
  background: #ffffff;
  color: transparent;
  font-size: 12px;
  transition: all 0.15s ease;
}

.qz-check input:checked + .qz-box {
  border-color: var(--primary-forest);
  background: var(--primary-forest);
  color: #ffffff;
}

.qz-check input:focus-visible + .qz-box {
  outline: 3px solid rgba(37, 161, 118, 0.45);
  outline-offset: 2px;
}

.qz-other {
  margin: -2px 0 4px;
}

.qz-detail {
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Uploads
   -------------------------------------------------------------------------- */
.qz-file {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.qz-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 20px;
  border: 2px dashed #b7c6bf;
  border-radius: var(--radius);
  background: #fbfdfc;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.qz-drop:hover,
.qz-file:focus-visible + .qz-drop {
  border-color: var(--accent-mint);
  background: var(--tint);
}

.qz-drop-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--primary-forest);
  font-size: 22px;
}

.qz-drop small {
  color: var(--text-muted);
  font-size: 13px;
}

.qz-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.qz-thumbs:empty {
  display: none;
}

.qz-thumb {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--light-bg);
}

.qz-thumb img,
.qz-thumb-file {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  color: var(--accent-sage);
  font-size: 28px;
}

.qz-thumb-name {
  display: block;
  padding: 6px 8px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qz-thumb-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.7);
  color: #ffffff;
  cursor: pointer;
}

.qz-tips {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--light-bg);
  list-style: none;
  color: var(--text-muted);
  font-size: 14px;
}

.qz-tips i {
  width: 18px;
  margin-right: 6px;
  color: var(--accent-mint);
}

/* --------------------------------------------------------------------------
   Consent
   -------------------------------------------------------------------------- */
.qz-consent-text {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent-mint);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--light-bg);
  color: #2b3a35;
  font-size: 15px;
}

/* --------------------------------------------------------------------------
   Buttons (same fill-on-hover effect as .TB-buy-now)
   -------------------------------------------------------------------------- */
.qz-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 28px;
  padding: 14px 24px;
  overflow: hidden;
  border: 1px solid var(--hover-fill);
  border-radius: var(--radius);
  background: var(--primary-forest);
  color: #ffffff;
  font: 600 17px var(--font-body);
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
}

.qz-btn::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -1;
  width: 0;
  background: var(--hover-fill);
  transition: width 0.4s ease-in-out;
}

.qz-btn:hover::before {
  width: 100%;
}

.qz-btn:disabled {
  border-color: #c5d1cc;
  background: #c5d1cc;
  cursor: not-allowed;
}

.qz-btn:disabled::before {
  display: none;
}

.qz-btn--ghost {
  border-color: var(--primary-forest);
  background: #ffffff;
  color: var(--primary-forest);
}

.qz-btn--ghost::before {
  background: var(--tint);
}

/* --------------------------------------------------------------------------
   End screens
   -------------------------------------------------------------------------- */
.qz-end {
  text-align: center;
}

.qz-end-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fdf1e7;
  color: #c4631a;
  font-size: 32px;
}

.qz-end-icon--ok {
  background: var(--tint);
  color: var(--accent-mint);
}

.qz-end-icon--muted {
  background: var(--tint);
  color: var(--accent-sage);
}

.qz-end-text {
  max-width: 480px;
  margin: 12px auto 0;
  color: var(--text-muted);
}

.qz-end-actions {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.qz-end-actions .qz-btn {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Trust strip & disclaimer
   -------------------------------------------------------------------------- */
.qz-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--primary-emerald);
  font-size: 14px;
  font-weight: 600;
}

.qz-trust i {
  margin-right: 6px;
  color: var(--accent-mint);
}

.qz-disclaimer {
  margin: 20px 0 0;
  color: #7a8a84;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .qz-header-inner {
    min-height: 60px;
  }

  .qz-logo img {
    height: 32px;
  }

  .qz-header-note span {
    display: none;
  }

  .qz-progress {
    padding-top: 18px;
  }

  /* Only the active section keeps its label on small screens. */
  .qz-sections li:not(.is-active) .qz-sec-label {
    display: none;
  }

  .qz-card {
    padding: 24px 20px 28px;
    border-radius: 14px;
  }

  .qz-title {
    font-size: 22px;
  }

  .qz-body {
    margin-top: 20px;
  }
}

@media (max-width: 420px) {
  .qz-choices--row3 {
    grid-template-columns: 1fr;
  }

  .qz-grid-2 {
    grid-template-columns: 1fr;
  }

  .qz-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {

  .qz-step,
  .qz-end,
  .qz-bar span,
  .qz-btn::before {
    animation: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Intro above the first question
   -------------------------------------------------------------------------- */
.qz-intro {
  margin: 8px 0 24px;
  text-align: center;
}

.qz-intro[hidden] {
  display: none;
}

.qz-intro-title {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-dark);
}

.qz-intro-text {
  margin: 0;
  font-size: 17px;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .qz-intro {
    margin: 4px 0 18px;
  }

  .qz-intro-title {
    font-size: 22px;
  }

  .qz-intro-text {
    font-size: 15px;
  }
}

/* --------------------------------------------------------------------------
   Not Eligible page (not-eligible.html)
   -------------------------------------------------------------------------- */
.ne-main {
  padding-top: 48px;
}

.ne-card {
  text-align: center;
}

.ne-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-forest);
  color: #ffffff;
  font-size: 26px;
}

.ne-label {
  margin: 14px 0 0;
  color: var(--accent-mint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ne-title {
  margin: 10px 0 0;
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-dark);
}

.ne-title span {
  color: var(--accent-mint);
}

.ne-text {
  max-width: 480px;
  margin: 14px auto 0;
  color: var(--text-muted);
}

.ne-reason {
  margin: 24px 0 0;
  padding: 18px 20px;
  border: 1px solid var(--accent-mint);
  border-radius: var(--radius);
  background: var(--tint);
  color: var(--primary-dark);
  font-size: 15px;
}

.ne-note {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.ne-card .qz-btn {
  margin-top: 20px;
}

.ne-help {
  margin: 20px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.ne-help a {
  color: var(--accent-mint);
  font-weight: 600;
}

@media (max-width: 640px) {
  .ne-main {
    padding-top: 24px;
  }

  .ne-title {
    font-size: 24px;
  }
}
