/* The hero "Product Finder" CTA and the AI Stack hero card's CTA render as
   <button data-quiz-trigger> on this page (they open the popup instead of
   navigating) — same look as the <a> version elsewhere, hover included. */
.hero-buttons button.hero-btn {
  font-family: inherit;
}

.hero-buttons button.hero-btn:hover {
  background: linear-gradient(90deg, #1D4A84 0%, #3E8CCA 100%);
  border: 1px solid;
  color: #fff;
  border-image-source: linear-gradient(180deg, #4683D1 0%, #5B94DD 100%);
}

/* ===========================================================
   Product Finder quiz popup
   Reuses the site's brand colours/radii/shadows (see .ai_card,
   .ai_goal_item, .ai_cta in style.css) so the popup reads as part
   of the same design system rather than a bolted-on component.
   =========================================================== */

.finder_modal_overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.finder_modal_overlay.open {
  display: flex;
}

.finder_modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #57B1FF4D;
  border-radius: 24px;
  box-shadow: 0px 20px 60px rgba(0, 0, 0, 0.25);
  padding: 34px 32px 26px;
  font-family: 'Inter', sans-serif;
  color: var(--text-color, #1D4A84);
  animation: finderModalIn .25s ease;
}

@keyframes finderModalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.finder_modal_close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-light, #F0F8FF);
  color: var(--text-color, #1D4A84);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---- progress ---- */

.finder_modal_progress {
  margin: 4px 40px 26px 0;
}

.finder_modal_progress_track {
  height: 6px;
  background: var(--bg-light, #F0F8FF);
  border-radius: 999px;
  overflow: hidden;
}

.finder_modal_progress_fill {
  height: 100%;
  width: 33.33%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4FAEF9 0%, #0073FF 100%);
  transition: width .3s ease;
}

.finder_modal_progress_meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}

#finderStepLabel { color: var(--text-color, #1D4A84); }

/* ---- step content ---- */

.finder_modal_body { min-height: 260px; }

.finder_step[hidden] { display: none; }

.finder_eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #0073FF;
  margin-bottom: 8px;
}

.finder_step h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--text-color, #1D4A84);
}

.finder_step_desc {
  color: #4b5563;
  font-size: 14px;
  margin: 0 0 22px;
}

.finder_goal_list.ai_goal_box {
  height: auto;
}

/* ---- intake sliders ---- */

.finder_metric { margin-bottom: 26px; }

.finder_metric_head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.finder_metric_title {
  font-size: 14px;
  font-weight: 500;
}

.finder_metric_value {
  font-size: 14px;
  font-weight: 600;
  color: #0073FF;
}

.finder_slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #F0F8FF;
  outline: none;
  cursor: pointer;
}

.finder_slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0088FF;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 115, 255, .45);
}

.finder_slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0088FF;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 115, 255, .45);
}

.finder_slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: #F0F8FF;
}

/* ---- results (step 3) ---- */

.finder_results_list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.finder_results_loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4b5563;
  font-size: 14px;
  padding: 30px 0;
  justify-content: center;
}

.finder_results_empty {
  color: #4b5563;
  font-size: 14px;
  padding: 30px 0;
  text-align: center;
}

.finder_spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d2eaff;
  border-top-color: #0073FF;
  border-radius: 50%;
  display: inline-block;
  animation: finderSpin .7s linear infinite;
}

@keyframes finderSpin {
  to { transform: rotate(360deg); }
}

.finder_result_item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-light, #F0F8FF);
  border-radius: 14px;
  padding: 10px 12px;
}

.finder_result_item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
  flex-shrink: 0;
}

.finder_result_info {
  flex: 1;
  min-width: 0;
}

.finder_result_info h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color, #1D4A84);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.finder_result_tag {
  font-size: 12px;
  color: #4b5563;
}

.finder_result_price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  margin-top: 4px;
}

/* Same Dirham icon used across product cards/cart/orders — sized to match
   (see .best_prices img / span.currency img / span.profile_order_price img)
   since the SVG has no intrinsic size and would otherwise render huge. */
.finder_result_price img {
  width: 14px;
  height: auto;
  flex-shrink: 0;
}

.finder_result_qty {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.finder_result_qty button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #cfe1f5;
  background: #fff;
  color: var(--text-color, #1D4A84);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.finder_qty_count {
  min-width: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
}

.finder_add_btn {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 0 16px;
  height: 34px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(90deg, #1D4A84 0%, #3E8CCA 100%);
}

.finder_add_btn:disabled {
  opacity: .7;
  cursor: default;
}

/* ---- footer actions ---- */

.finder_modal_actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.finder_btn_primary {
  flex: 1;
  border: none;
  height: 52px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(90deg, #4FAEF9 0%, #0073FF 100%);
  box-shadow: 3px 3px 7px 0px #5FA5E794 inset;
}

.finder_btn_primary:disabled {
  opacity: .6;
  cursor: default;
}

.finder_btn_secondary {
  border: none;
  background: none;
  height: 52px;
  padding: 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color, #1D4A84);
  cursor: pointer;
}

/* ===========================================================
   Mobile — full-screen bottom sheet
   =========================================================== */

@media (max-width: 640px) {
  .finder_modal_overlay {
    padding: 0;
    align-items: flex-end;
  }

  .finder_modal {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    height: 92vh;
    border-radius: 20px 20px 0 0;
    padding: 22px 20px 18px;
    display: flex;
    flex-direction: column;
    animation: finderSheetIn .28s ease;
  }

  .finder_modal::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #dbe6f5;
    margin: 0 auto 14px;
  }

  @keyframes finderSheetIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .finder_modal_close {
    top: 18px;
    right: 16px;
  }

  .finder_modal_body {
    flex: 1;
    overflow-y: auto;
  }

  .finder_modal_actions {
    margin-top: 16px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .finder_btn_primary,
  .finder_btn_secondary {
    width: 100%;
  }

  .finder_btn_secondary {
    height: 40px;
  }
}

/* ===========================================================
   Blood Test Upload intake popup — same .finder_modal_* shell
   as the Product Finder popup above; these rules only style the
   field/upload/consent content specific to that flow (Geviti-style
   labeled inputs with a required asterisk, rounded neutral borders).
   =========================================================== */

.finder_field_group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.finder_field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finder_field_label {
  font-size: 14px;
  font-weight: 500;
  color: #1A1A2E;
}

.finder_required {
  color: #EF4444;
}

.finder_field_input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #1A1A2E;
  background: #fff;
  transition: border-color .15s ease;
}

.finder_field_input::placeholder {
  color: #9CA3AF;
}

.finder_field_input:focus {
  outline: none;
  border-color: #0073FF;
}

textarea.finder_field_input,
.finder_field_textarea {
  height: auto;
  min-height: 90px;
  padding: 14px 16px;
  resize: vertical;
}

select.finder_field_input,
.finder_field_select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.finder_field.finder_field_invalid .finder_field_input {
  border-color: #EF4444;
}

.finder_field_error {
  color: #EF4444;
  font-size: 13px;
  margin-top: 10px;
}

/* ---- upload step ---- */

.finder_upload_zone {
  border: 1.5px dashed #CBD5E1;
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.finder_upload_zone:hover {
  border-color: #0073FF;
  background: var(--bg-light, #F0F8FF);
}

.finder_upload_icon {
  font-size: 22px;
  color: #0073FF;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bg-light, #F0F8FF);
  display: flex;
  align-items: center;
  justify-content: center;
}

.finder_upload_text {
  font-size: 15px;
  font-weight: 600;
  color: #1A1A2E;
  margin-bottom: 4px;
}

.finder_upload_hint {
  font-size: 13px;
  color: #6B7280;
}

.finder_upload_selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--bg-light, #F0F8FF);
}

.finder_upload_filename {
  font-size: 14px;
  font-weight: 600;
  color: #1A1A2E;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finder_upload_filesize {
  font-weight: 400;
  color: #6B7280;
}

.finder_upload_remove {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #EF4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

/* ---- review / consent step ---- */

.finder_consent_row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 16px;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.5;
  color: #374151;
}

.finder_consent_row input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #0073FF;
}

.finder_submit_success h2 {
  color: #16A34A;
}
