/*
 * 住宅ローン・フリーローン共通
 * form2.cgi以降の必須項目カウンターをform.cgiと同じ仕様にする。
 * コンポーネントCSSは変更せず、ページ側で既存の上書きを打ち消す。
 */

body.is-form-common .p-form-progress-anchor {
  position: fixed !important;
  top: auto !important;
  right: 90px !important;
  bottom: 60px !important;
  left: auto !important;
  z-index: 50 !important;
  width: 92px !important;
  max-width: none !important;
  height: 92px !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

body.is-form-common .p-form-progress::before {
  position: absolute !important;
  inset: 8px !important;
  display: block !important;
  border-radius: 50% !important;
  background: var(--c-form-color-white, #fff) !important;
  content: "" !important;
}

body.is-form-common .p-form-progress__body {
  position: relative !important;
  z-index: 1;
  display: grid !important;
  width: auto !important;
  height: auto !important;
  gap: 1px !important;
  place-items: center;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--c-form-color-text, #212121);
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

body.is-form-common .p-form-progress__label {
  color: var(--c-form-color-text, #212121);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

body.is-form-common .p-form-progress__value {
  color: var(--c-form-color-error, #df1111);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

@media screen and (max-width: 767px) {
  body.is-form-common .p-form-progress-anchor {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    width: 335px !important;
    max-width: calc(100vw - 40px) !important;
    height: 58px !important;
    margin: 0 !important;
    transform: translateX(-50%) !important;
  }

  body.is-form-common .p-form-progress::before {
    content: none !important;
  }

  body.is-form-common .p-form-progress__body {
    display: flex !important;
    width: auto !important;
    height: auto !important;
    align-items: baseline;
    justify-content: center;
    gap: 8px !important;
    padding: 0 !important;
  }

  body.is-form-common .p-form-progress__label {
    font-size: 13px;
  }

  body.is-form-common .p-form-progress__value {
    font-size: 18px;
  }
}
