/* GLOBAL & CONTAINER */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: #f5f5f5;
}
#macroactive-container {
  width: 90%;
  max-width: 450px;
  margin: 24px auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}
/* on the “unhappy2” step, force one-column stacking */
#step-unhappy2 .grid-2 {
  display: flex;
  flex-direction: column;
  gap: 8px; /* space between each checkbox */
}

#step-unhappy2 .checkbox-card {
  width: 100%;
  margin: 0; /* reset any bottom margin */
  padding-top: 0; /* if you’d rather bring them even closer */
  padding-bottom: 0;
}
/* on the “step-milestones” step, force one-column stacking */
#step-milestones .grid-2 {
  display: flex;
  flex-direction: column;
  gap: 8px; /* space between each checkbox */
}
#step-milestones .checkbox-card {
  width: 100%;
  margin: 0; /* reset any bottom margin */
  padding-top: 0; /* if you’d rather bring them even closer */
  padding-bottom: 0;
}
/* STEP PANELS */
.step {
  display: none;
  padding: 24px;
  box-sizing: border-box;
}
.step.active {
  display: block;
}
.step h2 {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
}
.step p {
  text-align: center;
  color: #666;
  font-size: 1rem;
  margin-bottom: 24px;
}

/* INPUT GROUPS */
.input-group {
  margin: 16px 0;
}
.input-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}
.input-group input,
.input-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  font-size: 1rem;
  box-sizing: border-box;
}
.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

/* Container grid: two columns on desktop, one on narrow screens */
#step-height-weight .hw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 2rem;
  margin: 1rem 0;
}

/* Each row: label + control */
#step-height-weight .hw-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Labels take fixed width */
#step-height-weight .hw-label {
  flex: 0 0 100px;
  font-weight: 600;
  font-size: 1rem;
  color: #333;
}

/* Controls flex to fill rest */
#step-height-weight .hw-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Style the selects to match modern inputs */
#step-height-weight select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 1;
  padding: 0.5em;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff
    url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6' stroke='%23666' fill='none'/%3E%3C/svg%3E")
    no-repeat right 0.75em center;
  background-size: 0.6em;
  cursor: pointer;
}

/* Small unit labels */
#step-height-weight span {
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
}

/* Center the unit-toggle row like a form switch */
#step-height-weight .unit-toggle-row {
  justify-content: flex-start;
  margin-top: 1rem;
}

/* Simple toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}
.switch input:checked + .slider {
  background-color: #007aff;
}
.switch input:checked + .slider:before {
  transform: translateX(18px);
}

/* Text next to toggle */
#step-height-weight .unit-text {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: #333;
}

/* PHONE INPUT */
.phone-input {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.phone-input select {
  flex: 1 1 35%;
}
.phone-input input {
  flex: 1 1 60%;
}

/* OPTION & CHECKBOX CARDS */
.option-card,
.checkbox-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin: 8px 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.option-card:has(input:checked),
.checkbox-card:has(input:checked) {
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.5);
}
.option-card label,
.checkbox-card label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
}

.icon-row {
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  margin-bottom: 10px;
  font-size: 24px;
}

.icon-left,
.icon-center,
.icon-right {
  flex: 1;
  text-align: center;
}

.option-card input,
.checkbox-card input {
  display: none;
}
.option-card label strong {
  display: block;
  margin-bottom: 4px;
}
.option-card label small,
.checkbox-card label small {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-top: 4px;
}

/* CONTINUE BUTTON */
.continue-btn {
  background: #000;
  color: #fff;
  padding: 14px;
  width: 100%;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  margin-top: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.continue-btn:hover {
  background: #333;
}
.continue-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* CONTAINER FOR THE BUTTONS */
#plan-buttons {
  max-width: 400px;
  margin: 0 auto; /* centers the container horizontally */
  padding: 0 1rem; /* optional: adds space inside the container on small screens */
  text-align: center; /* ensures text like button labels stay centered */
}

/* GRID LAYOUT */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

/* RATING GROUP */
.rating-group {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
}
.rating-group button {
  flex: 1;
  margin: 0 4px;
  padding: 14px 0;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
}
.rating-group button.active {
  background: #222;
  color: #fff;
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.5);
}

/* SLIDER STYLES */
.slider-container {
  margin: 20px 0;
}
.slider-value {
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}
input[type="range"] {
  width: 100%;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  background: #007aff;
  border-radius: 50%;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #007aff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* ICONS ABOVE SLIDER */
.icon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 16px 8px;
  font-size: 24px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  margin: 8px 16px 0;
  font-size: 0.9rem;
  color: #666;
}

/* DATE / HEIGHT / WEIGHT SELECTS */
.date-selects,
.height-weight-selects {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* PICKER WHEELS */
.height-weight-selects .picker {
  height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.picker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.picker-item {
  height: 40px;
  line-height: 40px;
  width: 100%;
  text-align: center;
  font-size: 1rem;
  color: #ccc;
}
.picker-item.selected {
  background: #eee;
  color: #000;
  font-weight: 600;
  border-radius: 16px;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #eee;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

/* animate the fill over the full duration */
.progress-fill {
  width: 0%;
  height: 100%;
  background-color: #007bff;
  /* we’ll override the duration in JS */
  transition: width 0ms ease-in-out;
}
.loading-item {
  display: none;
  font-size: 0.95rem;
  color: #333;
}
/* center the messages and hide them by default */
.progress-text-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

/* METRIC ALIGNMENT */
#metric-pickers .picker:first-child {
  grid-column: 1 / 3;
}

/* TOGGLE SWITCH */
.toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.toggle-label {
  font-size: 1rem;
  font-weight: 600;
  color: #000;
}
.toggle-label.inactive {
  color: #ccc;
  font-weight: 400;
}
.toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
  background: #ccc;
  border-radius: 14px;
  margin: 0 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-switch.active {
  background: #007aff;
}
.toggle-switch .thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.2s;
}
.toggle-switch.active .thumb {
  left: calc(100% - 26px);
}

/* LABEL ROW */
.label-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 8px;
}
.height-label {
  grid-column: 1 / 3;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.weight-label {
  grid-column: 3 / 4;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.pickers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ERROR MESSAGE */
.error-message {
  color: #ff3b30;
  font-size: 0.85rem;
  margin-top: 8px;
  display: none;
}

/* RESPONSIVE TWEAKS */
@media (max-width: 480px) {
  .step {
    padding: 16px;
  }
  .step h2 {
    font-size: 1.25rem;
  }
  .step p {
    font-size: 0.9rem;
  }
  .continue-btn {
    padding: 12px;
    font-size: 0.9rem;
  }
  .option-card label,
  .checkbox-card label {
    padding: 12px;
  }
  .rating-group button {
    margin: 0 2px;
    padding: 12px 0;
    font-size: 0.9rem;
  }
}

/* modern dropdown styling for the height/weight selects */
.height-weight-selects select {
  /* reset the native arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* match your app’s input look */
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5em 1.5em 0.5em 0.75em;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  margin-right: 0.5em;
}

/* add your custom arrow—adjust the SVG or URL to match your design */
.height-weight-selects select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6' stroke='%23666' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75em center;
  background-size: 0.65em;
}

/* focus state to match rest of app */
.height-weight-selects select:focus {
  outline: none;
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(100, 100, 150, 0.2);
}

/* ensure your unit labels line up nicely */
.height-weight-selects span {
  font-size: 1rem;
  color: #555;
  vertical-align: middle;
  margin-right: 1em;
}

.summary-grid-container {
  /* switch to flex or grid centering: */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;

  /* optional gap between items */
  gap: 1.5rem;

  /* center text inside each cell */
  text-align: center;
}

/* if you want each macro to have a minimum width: */
.summary-grid-container > div {
  flex: 0 1 120px;
}

/* Title at top of each product card */
.product-card__title {
  display: block;
  font-size: 1.25rem; /* tweak as needed */
  margin-bottom: 0.5rem;
  color: #222; /* match your headline color */
}

/* Ensure pricing text is normal weight */
.product-card__price {
  font-weight: normal;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
/* make the card a positioned parent */
.product-card {
  position: relative;
}

/* pull the trial badge up so it overlaps the price */
.product-card__trial {
  /* negative margin to lift it */
  margin-top: -0.75em;
  text-align: center; /* center under the title/price */
}

/* Keep the trial snippet bold + red */
.product-card__trial-text {
  display: inline-block; /* needed for transform to work */
  transform: rotate(-12deg);
  transform-origin: center;
  color: red;
  /* if you need a bit more lift relative to its container: */
  position: relative;
  top: -0.25em;
}

/* step-trial-timeline: full-width program title */
#step-trial-timeline .program-section__title {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* grid-2 wrapper: flex layout */
#step-trial-timeline .grid-2 {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

/* restore borders on each card */
#step-trial-timeline .product-card {
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 240px; /* adjust as needed */
  position: relative; /* for any overlap tweaks */
}

/* product title styling */
#step-trial-timeline .product-card__title {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #222;
}

/* pricing text normal weight */
#step-trial-timeline .product-card__price {
  font-weight: normal;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

/* trial badge styling (rotated & red) */
#step-trial-timeline .product-card__trial-text {
  display: inline-block;
  font-weight: bold;
  color: red;
  transform: rotate(-12deg);
  position: relative;
  top: -0.25em; /* tweak vertical overlap */
}
/* Make the anchor fill the card and remove default link styling */
.product-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* If you have hover effects on .product-card, you can scope them here */
.product-card__link:hover .product-card {
  /* e.g. slightly lift on hover */
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Restore transition if you want smooth hover */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Ensure the link has no extra padding/margin */
.grid-2 .product-card__link {
  margin: 0;
  padding: 0;
}

/* center the toggle in the step */
#step-speed-goal .unit-toggle {
  display: block;
  width: max-content;
  margin: 1rem auto;
  background: #e5e5ea;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* hide the native radios */
#step-speed-goal .unit-toggle input {
  display: none;
}

/* style each label as half the pill */
#step-speed-goal .unit-toggle label {
  padding: 0.4em 1em;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #007aff;
  transition: background 0.2s;
}

/* the “selected” segment: white background */
#step-speed-goal .unit-toggle input:checked + label {
  background: #007aff;
  color: #ffff;
}

#unit-goal-toggle {
  display: inline-flex;
  background: #007aff;
  color: #ffff;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
  margin: 1rem auto; /* centers it */
}
/* center & style the pill toggle */
.unit-toggle {
  display: block; /* so margin auto centers it */
  width: max-content;
  margin: 1.5rem auto;
  background: #e5e5ea;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.unit-toggle input {
  display: none; /* hide the radios */
}

.unit-toggle label {
  cursor: pointer;
  padding: 0.5em 1.2em;
  font-weight: 500;
  color: #007aff;
  transition: background 0.2s;
}

/* selected half of the pill */
.unit-toggle input:checked + label {
  background: #b79da4; /* your mauve highlight */
  color: #fff; /* white text atop the mauve */
}
