/* Center the form container */
.yl-form-container {
  padding-top: 73px;
  margin: auto;
  /* header + footer */
  min-height: calc(100vh - 160px - 73px); /* header height + footer height */
  overflow-y: auto; /* enable scroll only inside main if needed */
  padding-bottom: 100px; /* Add space for fixed footer */
}

/* Question text */
.yl-form-question {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 32px;
  letter-spacing: -0.6px;
  margin-bottom: 24px;
  color: #222;
  word-wrap: break-word;
  hyphens: auto;
}

/* Input field */
.yl-form-input {
  width: 100%;
  max-width: 410px;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  margin-bottom: 32px;
  transition: border 0.2s, box-shadow 0.2s;
  color: #222;
  box-sizing: border-box;
  min-height: 48px; /* Better touch target for mobile */
}

.yl-form-input:focus {
  border: 1.5px solid #bfa07a;
  outline: none;
  box-shadow: 0 0 0 2px #f3e9d2;
}

/* Progress bar container */
.yl-form-progress-container {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background-color: #eee;
  overflow: hidden;
}

/* Progress bar */
.yl-form-progress {
  height: 8px;
  background: #a65a4a;
  border-radius: 8px;
  transition: width 0.3s;
  position: absolute;
  left: 0;
  top: 0;
}

/* Navigation buttons */
.yl-form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0 24px;
  /* Allow wrapping on small screens */
}

.yl-form-btn:disabled,
.yl-form-btn[disabled] {
  background: #f7f7f1 !important;
  color: #babab2 !important;
  border: 1.5px solid #f7f7f1 !important;
  cursor: not-allowed;
}

.primary:hover {
  background: #8d473a !important;
}

/* Exit link */
.yl-form-exit {
  color: #a9594a;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
}

/* Exit link */
.yl-form-action {
  color: #a65a4a;
  font-size: 16px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  padding-right: 24px;
  width: 100%;
  gap: 10px;
}

/* Hide elements with x-cloak until Alpine.js initializes */
[x-cloak] {
  display: none !important;
}

/* Modal overlay */
.yl-form-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yl-form-modal {
  background: #fff;
  padding: 32px 24px;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.yl-form-modal .yl-form-btn {
  margin: 0 8px;
}

.yl-form-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  margin: auto;
  max-width: 410px;
  padding: 0 16px; /* Add horizontal padding for mobile */
}

/* Radio group container */
.yl-form-radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 410px;
  width: 100%;
  max-width: 410px;
}

/* Radio option */
.yl-form-radio-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
  background-color: #fff;
}

.yl-form-radio-option:hover {
  background: #faf7f2;
  border-color: #bfa07a;
}

.yl-form-radio-option input[type="radio"] {
  display: none;
}

.radio-icon {
  width: 20px;
  height: 20px;
  border: 2px solid #999;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.radio-icon::after {
  content: "";
  width: 10px;
  height: 10px;
  background-color: transparent;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon {
  border-color: #d2945b;
}

.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon::after {
  background-color: #d2945b;
}

.yl-form-radio-option input[type="radio"]:checked ~ span {
  font-weight: bold;
  color: #333;
}

.yl-form-radio-optionn input[type="radio"]:checked ~ .radio-icon,
.yl-form-radio-option input[type="radio"]:checked ~ span,
.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon::after {
  background-color: inherit;
}

.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon::after {
  background-color: #d2945b;
}

.yl-form-radio-option input[type="radio"]:checked ~ span,
.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon {
  background-color: #faf4ee;
}

/* Entire label background change */
.yl-form-radio-option input[type="radio"]:checked ~ .radio-icon::after {
  background-color: #d2945b;
}

.yl-form-radio-option input[type="radio"]:checked {
  position: absolute;
}

.yl-form-radio-option input[type="radio"]:checked + .radio-icon,
.yl-form-radio-option input[type="radio"]:checked + .radio-icon + span {
  background-color: #faf4ee;
}

input[type="date"].yl-form-input {
  height: 36px;
}

select.yl-form-input {
  appearance: none;
  -webkit-appearance: none;
  background: #fff
    url('data:image/svg+xml;utf8,<svg fill="%23999" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7.293 7.293a1 1 0 011.414 0L10 8.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z"/></svg>')
    no-repeat right 12px center/18px 18px;
}

input[type="date"].yl-form-input::-webkit-input-placeholder {
  color: #aaa;
}

input[type="date"].yl-form-input::-moz-placeholder {
  color: #aaa;
}

input[type="date"].yl-form-input:-ms-input-placeholder {
  color: #aaa;
}

input[type="date"].yl-form-input::placeholder {
  color: #aaa;
}

/* Hide default calendar icon */
input[type="date"].yl-form-input::-webkit-calendar-picker-indicator {
  opacity: 1;
  filter: invert(0.5);
  cursor: pointer;
  margin-right: 8px;
}

input[type="date"].yl-form-input:focus {
  border: 1.5px solid #bfa07a;
  outline: none;
  box-shadow: 0 0 0 2px #f3e9d2;
}

/* Input with unit group */
.yl-form-input-unit-group {
  position: relative;
  width: 100%;
  max-width: 410px;
  margin-bottom: 32px;
}

.yl-form-input-unit-group .yl-form-input {
  padding-right: 56px;
  margin-bottom: 0;
}

.yl-form-input-unit {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #bdbdbd;
  font-size: 1rem;
  pointer-events: none;
}

.date-wrapper {
  position: relative;
  min-width: 410px;
}

.date-input {
  padding: 10px 40px 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
}

.calendar-icon {
  position: absolute;
  right: 16px;
  top: 35%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 24px;
  height: 24px;
  color: #a85d4a;
  font-size: 1.3rem;
  pointer-events: none;
}

.yl-no-birthday-message {
  margin: 30px auto;
  padding: 20px;
  background-color: #f3e9dc;
  border-left: 5px solid #e6b800;
  color: #5c4631;
  max-width: 500px;
}

.yl-no-birthday-message strong {
  font-weight: bold;
  margin-bottom: 8px;
}

.yl-health-check-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: 48px 0;
  margin: 0 auto;
}

.yl-health-check-hero .start-btn {
  margin-top: 24px;
  width: 250px;
}

.yl-health-check-hero__desc {
  margin-bottom: 32px;
  color: #333;
}
.yl-health-check-hero__disclaimer {
  background: #faf6f2;
  padding: 16px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #222;
}
.yl-health-check-hero__disclaimer strong {
  display: block;
  margin-bottom: 6px;
}
.yl-health-check-hero__image img {
  display: block;
  max-width: 350px;
  height: auto;
}
@media (max-width: 800px) {
  .yl-health-check-hero {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .yl-health-check-hero__image {
    margin-top: 24px;
  }
}

button.modal-close {
  border: none;
  background: none;
}

.yl-health-check-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0;
}

/* Start page sections */
.yl-check-sections {
  margin-top: 24px;
}

.yl-info-section {
  margin-bottom: 22px;
}

.yl-info-label {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14px;
  box-sizing: border-box;
}

.yl-info-label.-works {
  background: #f3e9dc;
  color: #5c4631;
}

.yl-info-label.-matters {
  background: #f4e1e3;
  color: #6e3942;
}

.yl-info-label.-get {
  background: #e6f1e6;
  color: #2f6a3a;
}

.yl-info-label.-next {
  background: #e3eef9;
  color: #2f567a;
}

.yl-info-label.-reassurance {
  background: #f7ecd9;
  color: #6b4b24;
}

.yl-info-points {
  margin: 10px 0 0 22px;
  padding: 0;
  list-style: disc;
  color: #333;
}
.yl-info-points li {
  margin: 6px 0;
}

.age-badge {
  margin: 16px 0;
  background-color: #f2ebe2;
  color: #c2931c;
  font-weight: bold;
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 1rem;
}

.health-age-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #e9d9be;
  display: grid;
  place-items: center;
}

.health-age-circle-2 {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background-color: #f1e7da;
  display: grid;
  place-items: center;
}

.health-age-circle-3 {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background-color: #f8f3ed;
  display: grid;
  place-items: center;
  font-size: 51.2px;
  line-height: 57.6px;
  font-weight: bold;
  color: #a9594a;
}

.health-age-circle span {
  font-size: 2.8rem;
  font-weight: 700;
  color: #b97a4a;
  font-family: "PP Neue Machina", sans-serif;
}

.health-check-desc {
  color: #444;
  margin: 16px auto 30px auto;
  text-align: center;
}

.yl-product-recommend-section {
  text-align: center;
}

.yl-product-recommend-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.yl-product-recommend-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.yl-product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  width: 210px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.yl-product-card-image {
  position: relative;
  text-align: center;
  padding: 16px 0 0 0;
}
.yl-product-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #c96;
  color: #fff;
  font-size: 0.9em;
  padding: 3px 10px;
  border-radius: 16px;
  font-weight: bold;
}

.yl-product-card-title {
  font-size: 1rem;
  margin: 12px 0 6px 0;
  font-weight: 600;
  min-height: 40px;
}
.yl-product-card-desc {
  font-size: 0.92rem;
  color: #666;
  margin-bottom: 8px;
  min-height: 38px;
}

.yl-product-card-variations {
  margin-bottom: 8px;
}

.yl-product-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #ddd;
  margin-right: 4px;
  vertical-align: middle;
}

.yl-product-card-pricing {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 12px;
}

.yl-product-regular-price {
  text-decoration: line-through;
  color: #aaa;
  font-size: 0.95em;
  margin-left: 8px;
}

.yl-back-home-btn {
  width: 410px;
}

.yl-checkbox {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 450px;
}

.yl-checkbox:hover {
  border-color: #888;
}

.yl-checkbox label {
  flex: 1;
  cursor: pointer;
}

.yl-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.yl-form-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 80px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 10;
}

.guest-exit-btn {
  position: absolute;
  top: 25%;
  right: 20px;
  width: auto;
  padding: 8px 16px;
  background: none;
  border: none;
  color: #a9594a;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  z-index: 20;
}

.yl-btn-back {
  border: 1.5px solid #a9594a !important;
  color: #a9594a !important;
  background-color: #f7eeed !important;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
  .yl-form-container {
    padding-top: 20px;
    padding-bottom: 120px; /* More space for mobile footer */
  }

  .yl-form-content {
    max-width: 100%;
    padding: 0 20px;
  }

  .yl-form-question {
    font-size: 18px;
    line-height: 26px;
    margin-bottom: 20px;
  }

  .yl-form-input {
    max-width: 100%;
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 14px 16px;
    margin-bottom: 24px;
  }

  .yl-form-radio-group {
    min-width: 100%;
    max-width: 100%;
  }

  .yl-form-radio-option {
    padding: 16px;
    min-height: 56px; /* Better touch target */
  }

  .yl-form-nav {
    margin: 0 20px;
    gap: 12px;
  }

  .yl-form-btn {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 16px;
    flex: 1;
    min-width: 120px;
  }

  .yl-form-footer {
    padding: 0 20px;
    height: 90px; /* Slightly taller for mobile */
  }

  .yl-form-progress-container {
    height: 6px;
  }

  .yl-form-progress {
    height: 6px;
  }

  .yl-checkbox {
    min-width: 100%;
    padding: 16px;
    min-height: 56px;
  }

  .yl-form-input-unit-group {
    max-width: 100%;
  }

  .date-wrapper {
    min-width: 100%;
    max-width: 100%;
  }

  .guest-exit-btn {
    position: relative;
    top: 30%;
    right: 20px;
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .yl-form-content {
    padding: 0 16px;
  }

  .yl-form-question {
    font-size: 18px;
    line-height: 24px;
  }

  .yl-form-nav {
    flex-direction: row;
    margin: 0 16px;
    flex-wrap: unset;
  }

  .yl-form-btn {
    width: 100%;
    min-width: auto;
  }

  .yl-form-footer {
    padding: 0 16px;
    height: 100px;
  }

  .guest-exit-btn {
    position: relative;
    top: 30%;
    right: 16px;
    font-size: 14px;
    padding: 6px 12px;
  }
}

/* Landscape mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .yl-form-container {
    padding-top: 10px;
    padding-bottom: 100px;
  }

  .yl-form-question {
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 16px;
  }

  .yl-form-input {
    margin-bottom: 16px;
  }
}
