/**
 * Baby First-Year Cost Estimator — calculator section.
 * Shared below-section styles: height-predictor.css
 */

.pregnancy-calendar.baby-cost {
  --bcc-accent: #503b68;
  --bcc-accent-soft: #6e4f95;
  --bcc-green: #60a54a;
  --bcc-yellow: #fff8e6;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin: 0;
  padding: 24px 16px;
  border-radius: 12px;
  background-color: var(--bcc-yellow);
  background-image: url('../../img/how-much-will-your-baby-cost-in-the-first-year/much-will-background.svg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

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

  .pregnancy-calendar.baby-cost {
    padding: 32px;
    border-radius: 16px;
  }
}

.bcc__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

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

.bcc__layout {
  display: grid;
  gap: 24px;
}

.bcc__form-card,
.bcc__result-card {
  padding: 24px 20px;
  border-radius: 10px;
  background: #fff;
}

.bcc__form-card {
  width: 100%;
  max-width: 758px;
  box-sizing: border-box;
}

@media (min-width: 992px) {
  .bcc__layout {
    grid-template-columns: 758px minmax(320px, 1fr);
    align-items: start;
    gap: 32px;
  }

  .bcc__left {
    width: 758px;
    max-width: 100%;
  }

  .bcc__form-card {
    width: 758px;
    max-width: 100%;
  }

  .bcc__form-card,
  .bcc__result-card {
    padding: 32px;
  }
}

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

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

.bcc__section {
  margin-bottom: 0;
  border: 1px solid #503b68;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.bcc__section--major + .bcc__section--major {
  margin-top: 32px;
}

.bcc__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #503b68;
  border-radius: 10px 10px 0 0;
  background: #ffe0a3;
}

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

.bcc__section-meta {
  flex-shrink: 0;
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: #303030;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bcc__section-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

.bcc__subsection {
  border: none;
}

.bcc__subsection-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  color: #4d4d4d;
  list-style: none;
}

summary.bcc__subsection-label {
  cursor: pointer;
  border-width: 0 0 1px 0;
  border-style: solid;
  border-color: #503b68;
  background: #fff0d2;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  color: #303030;
  letter-spacing: 0.02em;
}

.bcc__subsection-title {
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

summary.bcc__subsection-label::-webkit-details-marker {
  display: none;
}

.bcc__subsection-marker {
  flex-shrink: 0;
  display: block;
  width: 11px;
  height: 11px;
  transition: transform 0.2s ease;
}

.bcc__subsection:not([open]) .bcc__subsection-marker {
  transform: rotate(-90deg);
}

.bcc__subsection-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: #fff;
}

.bcc__feeding-list,
.bcc__item-list,
.bcc__childcare-options {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bcc__subsection .bcc__item-list .bcc__feeding-option,
.bcc__subsection .bcc__item-list .bcc__item {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #503b68;
  padding: 12px 14px;
  margin: 0;
}

.bcc__section--major .bcc__subsection:last-child .bcc__item-list > .bcc__item:last-child,
.bcc__section--major .bcc__subsection:last-child .bcc__item-list > .bcc__feeding-list:last-child .bcc__feeding-option:last-child {
  border-bottom: none;
}

.bcc__subsection .bcc__item-list > .bcc__feeding-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bcc__section--childcare .bcc__section-body {
  padding: 0;
}

.bcc__section--childcare .bcc__childcare-options .bcc__childcare-option {
  border: none;
  border-radius: 0;
  border-bottom: 1px solid #503b68;
  padding: 12px 14px;
  margin: 0;
}

.bcc__section--childcare .bcc__childcare-options > :last-child {
  border-bottom: none;
}

.bcc__feeding-option,
.bcc__childcare-option,
.bcc__item {
  display: grid;
  grid-template-columns: auto 40px minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(77, 77, 77, 0.15);
  border-radius: 10px;
  background: #fff;
}

.bcc__feeding-option,
.bcc__childcare-option,
.bcc__item {
  cursor: pointer;
}

.bcc__feeding-radio,
.bcc__childcare-radio,
.bcc__item-radio {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--bcc-accent-soft);
  pointer-events: none;
}

.bcc__price-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 96px;
}

.bcc__cost-type {
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 22px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.bcc__item[hidden] {
  display: none !important;
}

.bcc__item-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.bcc__item-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

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

.bcc__item-meta {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 400;
  line-height: 22px;
  color: #6e4f95;
}

.bcc__item-status {
  text-transform: uppercase;
}

.bcc__item-meta-desc {
  text-transform: none;
}

.bcc__price-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 72px;
  max-width: 125px;
  padding: 8px;
  border: 1px solid #503b68;
  border-radius: 10px;
  background: #fff;
}

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

.bcc__price-input {
  width: auto;
  min-width: 2ch;
  border: none;
  background: transparent;
  outline: none;
  pointer-events: auto;
}

.bcc__price-input::-webkit-outer-spin-button,
.bcc__price-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bcc__actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  margin-top: 32px;
}

.bcc__actions .bcc__submit.pregnancy-calendar__submit {
  flex: 1 1 auto;
  width: 100%;
  max-width: 404px;
  min-width: 0;
  margin-top: 0;
  border-radius: 8px;
  background-color: #60a54a;
}

.bcc__actions .bcc__submit.pregnancy-calendar__submit:hover {
  background-color: #549640;
}

.bcc__actions .bcc__reset.pregnancy-calendar__clear {
  flex: 1 1 auto;
  width: 100%;
  max-width: 258px;
  margin-top: 0;
  padding: 12px 28px;
  border-radius: 8px;
  color: #6e4f95;
  border-color: rgba(110, 79, 149, 0.45);
  background-color: #fff;
}

.bcc__actions .bcc__reset.pregnancy-calendar__clear:hover {
  background-color: #faf7fd;
  border-color: #6e4f95;
}

.bcc__right {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  min-width: 0;
}

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

.bcc__result-note-text {
  margin: 0;
  width: 100%;
  max-width: none;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #4d4d4d;
  text-align: center;
}

.bcc__result-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 28px;
  width: 100%;
  text-align: left;
}

.bcc__result-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

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

.bcc__result-visual img {
  display: block;
  width: min(100%, 298px);
  height: auto;
  object-fit: contain;
}

.bcc__result-section {
  overflow: hidden;
  border: 1px solid #503b68;
  border-radius: 10px;
  background: #fff;
}

.bcc__result-section-title {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #503b68;
  background: #fff0d2;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
  color: #303030;
  text-align: center;
}

.bcc__result-metrics {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.bcc__result-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 12px 14px;
}

.bcc__result-metric .bcc__summary-label {
  width: 100%;
  gap: 8px;
}

.bcc__summary-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

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

.bcc__breakdown-list,
.bcc__insights-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0 14px 14px 14px;
  list-style: none;
}

.bcc__breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #4d4d4d33;
  background: #fff;
}

.bcc__result-section--breakdown .bcc__result-section-title {
  padding: 14px;
  border-bottom: none;
  background: transparent;
  text-align: left;
}

.bcc__result-section--breakdown .bcc__breakdown-row {
  padding: 0;
  border-bottom: 1px solid #4d4d4d33;
}

.bcc__result-section--breakdown .bcc__breakdown-row:last-child {
  border-bottom: none;
}

.bcc__result-section--insights .bcc__result-section-title {
  padding: 14px;
  border-bottom: none;
  background: transparent;
  text-align: left;
}

.bcc__result-section--insights .bcc__insight {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 0;
  border-bottom: 1px solid #4d4d4d33;
  background: #fff;
}

.bcc__result-section--insights .bcc__insight:last-child {
  border-bottom: none;
}

.bcc__insight {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid #503b68;
  background: #fff;
}

.bcc__breakdown-list > :last-child,
.bcc__insights-list > :last-child {
  border-bottom: none;
}

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

.bcc__breakdown-value {
  flex-shrink: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--bcc-accent-soft);
  text-align: right;
}

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

.bcc__summary-value,
.bcc__insight-value {
  flex-shrink: 0;
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  color: var(--bcc-accent-soft);
  text-align: left;
}

.bcc__summary-value--hero {
  font-size: 22px;
  font-weight: 800;
  line-height: 26px;
  text-align: left;
}

.bcc__hero-visual {
  display: none;
}

.bcc__summary-key {
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: #303030;
  text-transform: uppercase;
}

.bcc__result-metric--hero .bcc__summary-key {
  font-size: 16px;
  font-weight: 500;
  line-height: 22px;
}

.bcc__breakdown,
.bcc__insights {
  width: 100%;
  margin-top: 0;
}

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

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

  .bcc__right {
    display: contents;
  }

  .bcc__hero-visual {
    display: block;
    width: 100%;
    margin-top: 0;
    padding: 24px;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
  }

  .bcc__hero-visual img {
    display: block;
    width: 100%;
    max-width: 298px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
  }

  .bcc__result-visual {
    display: none;
  }

  .bcc__left {
    order: 1;
    width: 100%;
  }

  .bcc__form-card {
    width: 100%;
    max-width: none;
  }

  .bcc__result-note {
    order: 2;
  }

  .bcc__result-card {
    order: 3;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .pregnancy-calendar.baby-cost {
    gap: 24px;
  }

  .bcc__result-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .bcc__result-metrics > .bcc__result-metric:nth-child(5) {
    grid-column: 1 / -1;
  }

  .height-predictor-below {
    padding: 32px 0 48px;
  }
}

@media (max-width: 767px) {
  .bcc__item,
  .bcc__feeding-option,
  .bcc__childcare-option {
    grid-template-columns: auto 40px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
  }

  .bcc__feeding-radio,
  .bcc__childcare-radio,
  .bcc__item-radio {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    margin-top: 11px;
  }

  .bcc__feeding-option .bcc__item-icon,
  .bcc__childcare-option .bcc__item-icon,
  .bcc__item .bcc__item-icon {
    grid-column: 2;
    grid-row: 1;
  }

  .bcc__feeding-option .bcc__item-body,
  .bcc__childcare-option .bcc__item-body,
  .bcc__item .bcc__item-body {
    grid-column: 3;
    grid-row: 1;
  }

  .bcc__feeding-option .bcc__price-group,
  .bcc__childcare-option .bcc__price-group,
  .bcc__item .bcc__price-group {
    grid-column: 2 / -1;
    grid-row: 2;
    width: 100%;
    justify-self: stretch;
  }

  .bcc__feeding-option .bcc__price-wrap,
  .bcc__childcare-option .bcc__price-wrap,
  .bcc__item .bcc__price-wrap {
    width: 100%;
    max-width: none;
  }

  .bcc__form-title {
    margin-bottom: 8px;
  }

  .bcc__form-lead {
    margin-bottom: 8px;
  }

  .bcc__actions {
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
  }

  .bcc__actions .bcc__submit.pregnancy-calendar__submit,
  .bcc__actions .bcc__reset.pregnancy-calendar__clear {
    max-width: none;
  }

  .pregnancy-calendar.baby-cost {
    padding: 16px;
  }

  .bcc__form-card,
  .bcc__result-card,
  .bcc__result-note {
    padding: 16px;
  }

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

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

  .height-predictor-below {
    padding: 24px 0 30px;
  }
}

.height-predictor-below {
  padding: 64px 0 82px;
}
