@keyframes fadein {
  0% {
    opacity: 0;
  }

  70% {
    opacity: 1;
  }

  100% {
    opacity: 1;
  }
}

@keyframes fadeout {
  0% {
    visibility: visible;
    max-height: 1000px;
    opacity: 1
  }

  99% {
    visibility: hidden;
    max-height: 1000px;
    opacity: 0
  }

  100% {
    visibility: hidden;
    max-height: 0;
    border: none;
    opacity: 0
  }
}

input[type="text"] input[type="tel"],
textarea {
  font-size: 16px;
}

.form-toggle-item {
  position: relative;
  display: none;
  overflow: hidden;

  &.form-toggle--fadeout {
    animation: fadeout .2s ease-in 0s 1 forwards;
  }

  &.form-toggle--fadein {
    display: flex;
    animation: fadein .2s ease-in 0s 1 forwards;

    @media (width <=767px) {
      flex-direction: column;

    }

  }
}

.entry-form {
  font-size: 14px;
  line-height: 1.8;

  ::placeholder {
    color: #999;
  }

  select {
    appearance: none;
  }

}

.form-wrapper {
  background-color: #fff;

  @media (width >=768px) {
    border: solid 1px #b7bdc1;
    border-bottom: none;
  }

}

.form-item {
  border-bottom: 0;

  @media (width >=768px) {
    display: flex;
    border-bottom: solid 1px #b7bdc1;
  }

  dt {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    column-gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: #86939d;

    @media (width <=767px) {
      color: #fff;
    }

    @media (width >=768px) {
      display: grid;
      grid-template-columns: 1fr 50px;
      column-gap: 10px;
      align-items: center;
      width: 240px;
      font-weight: bold;
      background-color: #f5f5f7;
    }
  }

  dd {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 20px 10px;

    @media (width >=768px) {
      padding: 24px;
      border-left: solid 1px #b7bdc1;
    }

  }
}

.owner-name {
  display: none;
}

.form-status-badge {
  display: block;
  padding: 2px 10px 1px;
  font-size: 11px;
  text-align: center;
  border: solid 1px #cdcdce;
  border-radius: 22px;
}

.is-accent {
  .form-status-badge {
    color: #fff;
    background-color: #f01e28;
    border-color: #f01e28;
  }
}

.form-radios,
.form-checkboxs {
  label {
    @media (any-hover: hover) {
      cursor: pointer;
    }
  }
}

.form-checkboxs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  >li {
    flex: 0 0 calc(50% - 5px);

    label {
      display: block;
      border-radius: 3px;
    }

    input[type="checkbox"] {
      margin-inline-end: 10px;
    }
  }
}

.form-input-text,
.form-input-tel,
.form-input-email {
  width: 100%;
  padding: 7px 14px;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;

  @media (width >=768px) {
    width: 50%;
  }

}

.form-textarea {
  display: block;
  width: 100%;
  min-height: 200px;
  padding: 7px 14px;
  resize: vertical;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.form-image-checkbox__inner,
.form-image-radio__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  padding: 10px;
  text-align: center;
  border: solid 1px #e9e9eb;
  border-radius: 4px;
  box-shadow: 0 1px 1px 0 rgb(0 0 0 / 0.2);
  transition: all .2s ease-out;

  @media (width <=767px) {
    justify-content: center;
    min-height: 130px;
  }

  @media (width >=768px) {
    flex-direction: row;
  }


  >img {
    max-width: 60px;
    margin: 0;
  }
}

.form-checkbox,
.form-image-checkbox {
  position: absolute;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all .2s ease-out;

  @media (any-hover: hover) {
    cursor: pointer;
  }
}

.form-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  >li {
    flex: 0 0 calc(50% - 5px);
  }
}

.form-input-radio,
.form-input-checkbox {
  position: absolute;
  visibility: hidden;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all .2s ease-out;

  &:checked+.form-radio__inner,
  &:checked+.form-checkbox__inner {
    background-color: #e9f0fa;
    border-color: #2d4b87;
    box-shadow: 0 1px 1px 0 rgb(0 0 0 / .3) inset;
  }

}

.form-radio__inner,
.form-checkbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  padding: 22px 10px;
  border: solid 1px #e9e9eb;
  border-radius: 4px;
  box-shadow: 0 1px 1px 0 rgb(0 0 0 / .2);
  transition: all .2s ease-out;

  @media (width >=768px) {
    padding: 7px 14px;
  }

}

.form-select-wrapper {
  @media (width >=768px) {
    max-width: 320px;
  }

  &:has(.form-select) {
    position: relative;

    &::before {
      position: absolute;
      top: 50%;
      right: 10px;
      aspect-ratio: 1 / 1;
      font-family: "Material Symbols Rounded", sans-serif;
      font-size: 18px;
      line-height: 1;
      color: #1e2d3c;
      content: "\e5c7";
      transform: translate(0, -50%) rotate(180deg);
    }
  }
}

.form-select {
  width: 100%;
  padding: 7px 12px;
  color: #1e2d3c;
  cursor: pointer;
  border: solid 1px #dcdcde;
  border-radius: 4px;
}

:where(.form-checkbox:checked, .form-image-checkbox:checked) {

  +.form-checkbox__inner,
  +.form-image-checkbox__inner {
    background-color: #e9f0fa;
    border-color: #2d4b87;
    box-shadow: 0 1px 1px 0 rgb(0 0 0 / .3) inset;
  }
}

.form-notice {
  margin-block-end: 24px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: #42bda2;
}

.scrollbox {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 180px;
  padding: 14px;
  overflow-y: scroll;
  font-size: 12px;
  background-color: #fafafa;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.scrollbox-cont-title {
  font-weight: 700;
}

.form-confirm {
  padding-inline: 20px;
  margin-block-start: 24px;
}

.confirm-open {
  display: block;
  width: 100%;
  max-width: 450px;
  padding: 12px 10px;
  font-size: 20px;
  font-weight: 700;
  color: rgb(30 45 60 / .4);
  text-align: center;
  pointer-events: none;
  border-color: #e2e2e2;
  border-width: 0;
  border-radius: 4px;

  @media (any-hover: hover) {
    cursor: pointer;
  }
}

button:is(.is-disabled) {
  pointer-events: none;
}

.js-confirm-open {
  --color-main: #f01e28;

  display: block;
  width: 100%;
  padding-block: 15px;
  padding-inline: 20px;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  outline: 0;
  background-color: var(--color-main);
  border: 3px solid var(--color-main);
  border-radius: 4px;
  transition: all 0.2s;

  &.is-disabled {
    color: rgb(30 45 60 / .4);
    pointer-events: none;
    background-color: #e2e2e2;
    border-color: #e2e2e2;
  }

  @media (any-hover: hover) {
    cursor: pointer;

    &:hover {
      color: var(--color-main);
      background-color: #fff;
    }
  }
}

.form-item.is-success .form-status-badge {
  display: block;
  color: #fff;
  background-color: #42bda2;
  border-color: #42bda2;
}

.modal-dialog {
  display: none;
  height: 100%;
  padding-inline: 2.5%;
  margin-inline: auto;
  border: none;
  opacity: 0;
}

.modal-dialog__inner {
  z-index: 20;
  padding: 15px 20px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 7px;
  box-shadow: 0 0 7px rgb(0 0 0 / .2);
  opacity: 1;
}

.form-result--modal {
  margin-block-end: 30px;
}

.confirm-button {
  max-width: 448px;
  margin-inline: auto;
  cursor: pointer;
}

.butons--modal {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.show--modal {
  display: block;
  animation: fadein .75s cubic-bezier(0.35, 1, 0.65, 1) 1 forwards;
}

.form-result__item {
  --gap: 10px;

  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  padding-block: 20px;

  dt,
  dd {
    width: calc(50% - var(--gap) / 2);
  }
}


.form-result__list {
  display: flex;
  flex-direction: column;

  .form-result__item {
    &:not(:first-child) {
      border-bottom: 1px solid #ccc;
    }
  }
}

.form-submit-button {
  padding: 10px;
  color: #fff;
  background-color: #5cb85c;
  border: 0;
  border-radius: 4px;
  transition: all 0.4s;

  @media (any-hover: hover) {
    cursor: pointer;
  }
}

.form-back-button {
  padding: 10px;
  background-color: #d4d4d4;
  border: 0;
  border-radius: 4px;
  transition: all 0.4s;

  @media (any-hover: hover) {
    cursor: pointer;
  }
}

.error-message-container {
  padding-block-start: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #f01e28;
}



/* -----------------------------------------------------
	送信後ローディング
----------------------------------------------------- */

.loading-layer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  background: rgb(0 0 0 / 0.7);
}

.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -30px;
  margin-left: -30px;
  border-top: 5px solid rgb(255 255 255 / 0.2);
  border-right: 5px solid rgb(255 255 255 / 0.2);
  border-bottom: 5px solid rgb(255 255 255 / 0.2);
  border-left: 5px solid #fff;
  border-radius: 50%;
  transform: translateZ(0);
  animation: load-circle 1.0s linear infinite;
}

@keyframes load-circle {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


/* -----------------------------------------------------
	サンクスページ
----------------------------------------------------- */
.thanks {
  display: grid;
  place-content: center;
  height: 50svh;
  padding: 15px;
  margin-top: 20px;
  text-align: center;
}

.thanks-title {
  margin-block-end: 30px;
  font-size: 18px;
  font-weight: bold;
}

.thanks-message {
  font-size: 14px;
}


.thanks-back {
  margin-block: 28px;
}

.thanks-back-link {
  display: block;
  place-content: center;
  max-width: 210px;
  padding: 10px;
  margin-inline: auto;
  font-size: 14px;
  color: #f01e28;
  background-color: #fff;
  border: 3px solid #f01e28;
  border-radius: 0.25rem;
  transition: all 0.4s;
}