/* Contact form pages */
.contact-page {
  background: #fff;
  min-height: 50vh;
}

.contact-page-title {
  background: #2875cf;
  color: #fff;
  padding: 0.74rem 0;
}
.contact-page-title .container {
  width: 12.4rem;
}

.contact-page-title h1 {
  margin: 0;
  font-size: 0.28rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.contact-body {
  padding: 1rem 0 1rem;
  max-width: 10rem;
}

.contact-body--thanks {
  max-width: 12.4rem;
  width: 96%;
}

.contact-form {
  width: 100%;
}

.form-field {
  margin-bottom: 0.48rem;
}

.contact-form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.form-field label,
.confirm-label,
.form-field legend {
  display: block;
  font-size: 0.18rem;
  font-weight: 500;
  color: #000;
  margin-bottom: 0.1rem;
}

.form-field legend {
  padding: 0;
}

.req {
  color: #2875cf;
  font-weight: 500;
}

.opt,
.note-inline {
  color: #2875cf;
  font-weight: 500;
}

.field-hint {
  margin: 0 0 0.1rem;
  font-size: 0.12rem;
  font-weight: 500;
  color: #000;
  line-height: 1.7;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-radius: 0.06rem;
  background: #e1f0fe;
  padding: 0.22rem 0.18rem;
  font-family: inherit;
  font-size: 0.18rem;
  font-weight: 500;
  color: #000;
  line-height: 1.5;
  outline: none;
  appearance: none;
}

.contact-form textarea {
  min-height: 2rem;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  box-shadow: 0 0 0 0.02rem #2875cf;
}

.form-field.is-invalid input,
.form-field.is-invalid textarea {
  box-shadow: 0 0 0 0.02rem #e14b4b;
  background: #fff2f2;
}

.form-error {
  margin: 0.08rem 0 0;
  font-size: 0.13rem;
  font-weight: 600;
  color: #e14b4b;
  line-height: 1.5;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.06rem 0.2rem;
  margin-bottom: 0.5rem;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.16rem 0.36rem;
  justify-content: space-between;
  padding-right: 1rem;
  margin-bottom: 0.5rem;
}

.check-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.18rem;
  font-size: 0.16rem !important;
  font-weight: 500 !important;
  color: #000;
  cursor: pointer;
  margin: 0 !important;
}

.check-item input {
  width: 0.12rem;
  height: 0.12rem;
  margin: 0;
  margin-left: 0.04rem;
  accent-color: #2875cf;
  flex: none;
}

.check-item.is-readonly {
  cursor: default;
  pointer-events: none;
}

.check-item.is-readonly input:disabled {
  opacity: 1;
  accent-color: #2875cf;
}

.confirm-value {
  margin: 0;
  min-height: 0;
  padding: 0.06rem 0;
  background: transparent;
  border-radius: 0;
  font-size: 0.16rem;
  font-weight: 500;
  line-height: 1.6;
  color: #000;
  white-space: pre-wrap;
  word-break: break-word;
}

.confirm-message {
  min-height: 2rem;
}

.form-actions {
  display: flex;
  justify-content: center;
  gap: 0.24rem;
  margin-top: 0.56rem;
}

.contact-submit,
.contact-back {
  min-width: 2.8rem;
  border: 0;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.form-actions-confirm .button-outline {
  background: #fff;
  color: #fa8c00;
  border: 0.02rem solid #fa8c00;
}

.form-actions-confirm .button-outline:hover {
  opacity: 0.75;
}

.thanks-box {
  text-align: center;
  padding: 0.3rem 0.2rem 0rem;
}

.thanks-heading {
  margin: 0 auto 0.58rem;
  font-size: 0.35rem;
  color: #000;
  font-weight: 500;
  line-height: 1.4;
  width: max-content;
  max-width: 100%;
  padding-bottom: 0.05rem;
  background-image: linear-gradient(to right, #cfe8ff, #2875cf);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 0.04rem;
}

.thanks-box p {
  margin: 0 0 0.36rem;
  font-size: 0.21rem;
  font-weight: 300;
  line-height: 1.5;
  color: #000;
}

.thanks-contact {
  margin-top: 0.48rem !important;
  font-size: 0.21rem;
  font-weight: 700;
  line-height: 1.9;
}

.thanks-contact strong {
  font-weight: 700;
}

.thanks-contact-sub {
  display: inline-block;
  font-size: 0.16rem;
  font-weight: 700;
}

@media (max-width: 768px) {
  .contact-page-title {
    padding: 0.8rem 0;
    text-align: center;
  }

  .contact-page-title .container {
    width: 100%;
    max-width: calc(100% - 0.8rem);
  }

  .contact-page-title h1 {
    display: inline-block;
    font-size: 0.44rem;
    text-align: center;
    padding-bottom: 0.1rem;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.35), #fff);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 0.8rem 0.03rem;
  }

  .contact-body {
    padding: 0.14rem 0 1.2rem;
    max-width: 74%;
  }

  .contact-body--thanks {
    max-width: 96%;
    width: 96%;
  }

  .form-field {
    margin-bottom: 0.7rem;
  }

  .form-field label,
  .confirm-label,
  .form-field legend {
    font-size: 0.28rem;
  }

  .field-hint {
    font-size: 0.24rem;
  }

  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form input[type="tel"],
  .contact-form textarea,
  .confirm-value {
    font-size: 0.28rem;
    padding: 0.24rem 0.28rem;
    border-radius: 0.1rem;
  }

  .check-grid {
    grid-template-columns: max-content 1fr;
    justify-content: start;
    column-gap: 0.36rem;
    row-gap: 0.2rem;
  }

  .check-row {
    display: grid;
    grid-template-columns: max-content max-content;
    justify-content: start;
    column-gap: 0.36rem;
    row-gap: 0.2rem;
    flex-direction: unset;
    padding-right: 0;
  }

  .check-item {
    font-size: 0.24rem !important;
    gap: 0.12rem !important;
  }

  .check-item input {
    width: 0.2rem;
    height: 0.2rem;
  }

  .form-error {
    font-size: 0.22rem;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .contact-submit,
  .contact-back {
    width: 5rem;
margin: 0 auto;
min-width: 0;
font-size: 0.32rem;
font-weight: 500 !important;
padding: 0.3rem;
line-height: 1.5;
  }

  .thanks-box {
    padding: 0.8rem 0 1rem;
  }

  .thanks-heading {
    font-size: 0.4rem;
    margin-bottom: 0.28rem;
    padding-bottom: 0.12rem;
    background-size: 100% 0.04rem;
  }

  .thanks-box p {
    font-size: 0.26rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
  }

  .thanks-contact {
    font-size: 0.26rem !important;
  }

  .thanks-contact-sub {
    font-size: 0.22rem;
  }
}
