/**
 * Chinese Gender & Zodiac Predictor — calculator section.
 * Shared below-section styles: height-predictor.css
 */

.gender-zodiac-predictor-page .gender-zodiac-predictor-content__list,
.gender-zodiac-predictor-page .gender-zodiac-predictor-content__zodiac-list {
  margin: 0 0 16px;
  padding-left: 24px;
  list-style-type: disc;
  list-style-position: outside;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.gender-zodiac-predictor-page .gender-zodiac-predictor-content__list li,
.gender-zodiac-predictor-page .gender-zodiac-predictor-content__zodiac-list li {
  display: list-item;
  margin-bottom: 4px;
}

.gender-zodiac-predictor-page .gender-zodiac-predictor-content__zodiac-list {
  list-style-type: none;
  padding-left: 0;
}

.gender-zodiac-predictor-page .gender-zodiac-predictor-content__zodiac-list li span[aria-hidden="true"] {
  display: inline-block;
  min-width: 1.5em;
}

.gender-zodiac-predictor-page .gender-zodiac-predictor-content__heading {
  margin: 24px 0 12px;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: #303030;
}

.pregnancy-calendar.gender-zodiac-predictor {
  --gzp-accent: #60a54a;
  --gzp-accent-dark: #4f8f3d;
  --gzp-purple: #503b68;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 0;
  padding: 24px 16px;
  background-color: #fff;
  background-image: url('../../img/gender-zodiac-predictor/chinese-gender-zodiac-predictor.svg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

@media (min-width: 992px) {
  body.mamaspedia-burger-desktop .gender-zodiac-predictor-page .pregnancy-calendar-page__intro .container,
  body.mamaspedia-burger-desktop .gender-zodiac-predictor-page .height-predictor-below .container {
    margin-left: max(var(--spacing-6), calc((100vw - var(--container-2xl)) / 2 - var(--spacing-24)));
    margin-right: auto;
  }
}

@media (min-width: 992px) {
  .pregnancy-calendar.gender-zodiac-predictor {
    padding: 32px;
    border-radius: 16px;
  }
}

.gzp__header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 0;
}

.gzp__header-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.gzp__badge {
  display: block;
  margin: 0;
  color: #303030;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 14px;
}

.gzp__title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  color: #303030;
}

.gzp__subtitle {
  margin: 0;
  max-width: 640px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 18px;
  color: #4d4d4d;
}

.gzp__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 992px) {
  .gzp__layout {
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 24px;
    align-items: stretch;
  }

  .gzp__left:has(.js-gzp-form:not(.is-advanced-open)) {
    align-self: start;
    height: auto;
  }
}

.gzp__left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  min-height: 0;
}

.gzp__form-card {
  padding: 32px;
  border-radius: 16px;
  background: #fff;
}

.gzp__result-card {
  padding: 32px 32px 20px;
  border-radius: 16px;
  background: #fff;
}

.gzp__form-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
}

.gzp__form-card.is-advanced-open {
  height: 100%;
}

.gzp__form-title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 22px;
  color: #303030;
}

.gzp__form-lead {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
}

.gzp__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.gzp__label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 26px;
  color: #303030;
}

.gzp__date-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(77, 77, 77, 0.2);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #303030;
  outline: none;
}

.gzp__date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
}

.gzp__date-input:focus {
  border-color: rgba(80, 59, 104, 0.45);
}

.gzp__hint {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  color: #888;
}

.gzp__field-error {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 13px;
  line-height: 18px;
  color: #c0392b;
}

.gzp__advanced-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(80, 59, 104, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gzp__advanced-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gzp__advanced-toggle-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid #b1a8f6;
  border-radius: 50%;
  background: #fff;
  transition: background 0.2s, border-color 0.2s;
}

.gzp__advanced-checkbox:checked + .gzp__advanced-toggle-box {
  border-color: var(--gzp-purple);
  background: radial-gradient(circle at center, var(--gzp-purple) 0 5px, #fff 5px 100%);
}

.gzp__advanced-toggle-text {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
}

.gzp__advanced {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gzp__form-card.is-advanced-open .gzp__advanced-toggle {
  border-color: var(--gzp-purple);
}

.gzp__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 6px;
}

.gzp__submit.pregnancy-calendar__submit {
  flex: 1;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: #60a54a;
  color: #fff;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.gzp__submit.pregnancy-calendar__submit:hover {
  background: var(--gzp-accent-dark);
}

.gzp__submit.pregnancy-calendar__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.gzp__reset.pregnancy-calendar__clear {
  flex: 1;
  width: 100%;
  min-height: 48px;
  border: 1px solid #b1a8f6;
  border-radius: 8px;
  background: #fff;
  color: var(--gzp-purple);
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.gzp__form-errors {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fdecea;
  color: #c0392b;
  font-size: 14px;
}

.gzp__form-errors p {
  margin: 0 0 4px;
}

.gzp__form-errors p:last-child {
  margin-bottom: 0;
}

.gzp__right {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  min-height: 0;
}

@media (min-width: 992px) {
  .gzp__right {
    grid-column: 2;
    grid-row: 1;
  }
}

.gzp__result-card {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.gzp__result-empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  text-align: center;
}

.gzp__result-filled {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.gzp__result-visual {
  display: flex;
  justify-content: center;
  margin: 0;
}

.gzp__result-visual img {
  display: block;
  width: 364px;
  height: 271px;
  max-width: 100%;
  object-fit: contain;
}

.gzp__result-heading {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 500;
  line-height: 22px;
  color: #303030;
}

.gzp__result-filled .gzp__result-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 600;
  line-height: 26px;
}

.gzp__result-filled.is-boy .gzp__result-title,
.gzp__result-filled.is-boy .js-gzp-result-title-text {
  color: #00a7e8;
}

.gzp__result-filled.is-girl .gzp__result-title,
.gzp__result-filled.is-girl .js-gzp-result-title-text {
  color: #ff6ca0;
}

.gzp__result-heart {
  flex-shrink: 0;
  display: block;
  width: 26px;
  height: 26px;
}

.gzp__emotional-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 525px;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid #503b68;
  border-radius: 10px;
  background: #fff;
}

.gzp__emotional-banner__heart {
  flex-shrink: 0;
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.gzp__emotional-banner__text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
  text-align: center;
}

.gzp__emotional-banner__baby {
  flex-shrink: 0;
  display: block;
  width: 100px;
  height: auto;
  object-fit: contain;
}

.gzp__result-lead {
  margin: 0;
  max-width: 525px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
}

.gzp__confidence {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 525px;
  margin: 24px 0 0;
  text-align: left;
}

.gzp__confidence-row {
  display: grid;
  grid-template-columns: 40px 1fr 48px;
  align-items: center;
  gap: 12px;
}

.gzp__confidence-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
}

.gzp__confidence-bar-wrap {
  height: 16px;
  border-radius: 999px;
  background: #ececec;
  overflow: hidden;
}

.gzp__confidence-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}

.gzp__confidence-bar--boy {
  background: linear-gradient(90deg, #a4d6fe 0%, rgba(0, 167, 232, 0.75) 100%);
}

.gzp__confidence-bar--girl {
  background: linear-gradient(90deg, #ff6ca0 0%, #fea4c6 55.29%);
}

.gzp__confidence-pct {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
  text-align: right;
}

.gzp__zodiac-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 525px;
  margin-top: 14px;
  margin-bottom: 20px;
}

.gzp__zodiac-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border: 1px solid #503b68;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.gzp__zodiac-icon {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.gzp__zodiac-key {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gzp-purple);
}

.gzp__zodiac-value {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  color: #6e4f95;
  text-transform: uppercase;
}

.gzp__result-disclaimer {
  width: 100%;
  max-width: 390px;
  margin: 20px auto 0;
  padding: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
  text-align: center;
}

.gzp__disclaimer {
  width: 100%;
  padding: 32px;
  border-radius: 10px;
  background: #fff;
}

.gzp__disclaimer-text {
  width: 100%;
  max-width: 688px;
  margin: 0 auto;
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 16px;
  line-height: 18px;
  color: #303030;
  text-align: center;
}

@media (min-width: 992px) {
  .gzp__left {
    grid-column: 1;
    grid-row: 1;
  }
}

.gzp__disclaimer-icon {
  display: inline;
  width: 1em;
  height: 1em;
  margin-right: 0.35em;
  vertical-align: -0.125em;
}

@media (max-width: 991px) {
  .gzp__layout {
    display: flex;
    flex-direction: column;
  }

  .gzp__left {
    display: contents;
  }

  .gzp__right {
    display: contents;
    gap: 20px;
  }

  .gzp__result-card {
    order: 1;
    padding: 16px 16px 20px;
  }

  .gzp__form-card {
    order: 2;
    padding: 16px;
  }

  .gzp__disclaimer {
    order: 3;
    padding: 16px;
  }

  .gender-zodiac-predictor-page .height-predictor-content p {
    line-height: 18px;
  }

  .gender-zodiac-predictor-page .gender-zodiac-predictor-content__list li,
  .gender-zodiac-predictor-page .gender-zodiac-predictor-content__zodiac-list li {
    line-height: 18px;
  }

  .gender-zodiac-predictor-page .pregnancy-calendar-page__intro {
    padding-bottom: 0;
  }

  .pregnancy-calendar.gender-zodiac-predictor {
    padding: 20px 12px;
    border-radius: 12px;
  }

  .gzp__title {
    font-size: 22px;
    line-height: 28px;
  }

  .gzp__result-visual img {
    width: min(364px, 100%);
    height: auto;
    aspect-ratio: 364 / 271;
  }

  .gzp__emotional-banner {
    gap: 8px;
    padding: 10px 12px;
  }

  .gzp__emotional-banner__heart {
    width: 52px;
    height: 52px;
  }

  .gzp__emotional-banner__baby {
    width: 72px;
  }

  .gzp__emotional-banner__text {
    font-size: 14px;
    line-height: 20px;
  }

  .gzp__zodiac-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: none;
  }

  .gzp__zodiac-item {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 12px;
    width: 100%;
    padding: 12px 16px;
    text-align: left;
  }

  .gzp__zodiac-icon {
    grid-row: 1 / -1;
    grid-column: 1;
    width: 56px;
    height: 56px;
  }

  .gzp__zodiac-key {
    grid-column: 2;
    grid-row: 1;
    font-size: 12px;
    line-height: 16px;
  }

  .gzp__zodiac-value {
    grid-column: 2;
    grid-row: 2;
    font-size: 16px;
    line-height: 26px;
  }
}
