/* Scoped to the onboarding shell only — unscoped `.mealz-modal` leaked height: 680px
   to other planner modals (e.g. budget edit) once this stylesheet was loaded. */
.mealz-planner-onboarding__modal-root .mealz-modal {
  height: 680px;
  max-width: 600px;
  max-height: 100%;
  padding: 0;
  z-index: 6003;

  .mealz-modal__header {
    padding: 24px;
  }

  .mealz-modal__content-container {
    padding-top: 0;
    height: calc(100% - 80px);
    box-sizing: border-box;
  }
}

@media (max-width: 768px) {
  .mealz-planner-onboarding__modal-root .mealz-modal {
    height: 740px;
    width: 100%;
    max-width: unset;
    top: unset;
    left: 0;
    bottom: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    transform: none;
  }
}

.mealz-planner-onboarding-modal {
  display: flex;
  flex-direction: column;
  height: 100%;

  .mealz-planner-onboarding-modal__body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0 24px;
    overflow: auto;

    .mealz-planner-onboarding-modal__content {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 100%;
  
      .mealz-planner-onboarding-modal__img {
        width: 100%;
        height: auto;
        margin-bottom: 16px;
        max-width: 552px;

        @media (max-width: 768px) {
          max-width: 343px;
        }
      }
  
      .mealz-planner-onboarding-modal__title {
        margin-bottom: 4px;
        text-align: center;
      }
  
      .mealz-planner-onboarding-modal__text {
        text-align: center;

        span {
          display: inline;
          padding: 0 4px 0 0;
        }
  
        .mealz-planner-onboarding-modal__bold {
          font-weight: 700;

          &:last-of-type {
            color: var(--mealz-ds-color-primary);
          }
        }
      }
    }
  
    .mealz-planner-onboarding-modal__track {
      display: flex;
      justify-content: center;
      width: 100%;
      margin-top: 24px;

      > *:not(:last-child) {
        margin-right: 8px;
      }

      .mealz-planner-onboarding-modal__indicator {
        width: 32px;
        height: 8px;
        border-radius: 50px;
        background-color: var(--mealz-ds-color-primary, #24748F);
        opacity: 0.4;
        transition: all 0.3s ease-in-out;
      }

      .mealz-planner-onboarding-modal__indicator.active {
        width: 80px;
        height: 8px;
        opacity: 1;
      }
    }
  }

  @media (max-width: 768px) {
    .mealz-planner-onboarding-modal__body {
      padding: 0 16px;
    }
  }

  .mealz-planner-onboarding-modal__navigation-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
    margin-top: 24px;

    > *:not(:last-child) {
      margin-right: 8px;
    }
  }

  @media (max-width: 768px) {
    .mealz-planner-onboarding-modal__navigation-buttons {
      flex-direction: column-reverse;
      padding: 0 16px;

      > *:not(:last-child) {
        margin-right: 0;
      }

      > *:not(:first-child) {
        margin-bottom: 8px;
      }

      .mealz-planner-onboarding-modal__previous,
      .mealz-planner-onboarding-modal__next {
        width: 100%;
        flex: 1;
      }
    }
  }

  .mealz-planner-onboarding-modal__previous,
  .mealz-planner-onboarding-modal__next {
    &.hidden {
      display: none;
    }
  }
}