@charset "UTF-8";
/* お問い合わせフォーム専用スタイル */
/**
 * clamp関数の文字列を返す
 * (詳細は参考記事と同様)
 */
/**
 * 与えられた値をピクセル(px)単位に変換する関数
 */
/**
 * ピクセル(px)単位の値をrem単位に変換する関数
 */
/**
 * ★★★ 補助関数：小数点以下の指定した桁数で四捨五入する関数 ★★★
 */
/**
 * 補助関数：累乗を計算する関数
 */
.contact, .trial {
  min-height: 100dvh;
}

.section-content {
  max-width: 1400px;
  margin: auto;
  padding: clamp(3rem, 7vw, 10rem) 0;
  padding: clamp(10rem, 12vw, 14rem) 0;
}

.form-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(3rem, 5vw, 13rem);
}

.form-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  width: 100%;
}

/* フォーム要素 */

.form-sites-list {
  line-height: 1.8;
  padding-inline-start: 2rem;
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-label .required {
  color: #d32f2f;
  margin-left: 0.3rem;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1.4rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-control:focus {
  outline: none;
  border-color: #1a4480;
  box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.1);
}
.form-control.is-invalid {
  border-color: #d32f2f;
}
.form-control.is-invalid:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-radio {
  gap: 1rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.invalid-feedback {
  display: none;
  color: #d32f2f;
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

.was-validated .form-check-input:invalid ~ .invalid-feedback,
.form-check-input.is-invalid ~ .invalid-feedback {
  display: block;
}

/* HTML5バリデーションツールチップのスタイル調整 */
.was-validated .form-control:invalid:not(:focus):not(:-moz-placeholder) {
  border-color: #d32f2f;
}
.was-validated .form-control:invalid:not(:focus):not(:placeholder-shown),
.was-validated .form-control.is-invalid {
  border-color: #d32f2f;
}
.was-validated .form-control:invalid:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

/* チェックボックス/Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.form-check-input {
  margin-top: 0.3rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label {
  cursor: pointer;
  line-height: 1.6;
}
.form-check-label a {
  color: #1a4480;
  text-decoration: underline;
  transition: opacity 0.3s ease;
}
.form-check-label a:hover {
  opacity: 0.7;
}

/* 確認・送信ボタン */
.form .btn {
  letter-spacing: 0.2em;
}

.form-confirm .btn {
  width: 100%;
}
.form-confirm .form-item {
  margin-bottom: 2rem;
}
.form-confirm .form-value {
  border: 1px solid rgba(26, 68, 128, 0.3);
  min-height: 3.3rem;
  padding: 0.5rem;
  pointer-events: none;
}

.form-submit {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.loading {
  position: fixed;
  height: 100dvh;
  width: 100%;
  background: rgba(0, 0, 0, 0.8);
  left: 0;
  top: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}
.loading-text {
  padding: 1rem;
}
.loading .spinner {
  display: block;
  width: 30px;
  height: 30px;
  margin: auto;
  border-radius: 50%;
  border: 4px solid #FFF;
  border-left-color: transparent;
  animation: spinner-rotation 1s linear infinite;
}

/* アニメーションの設定 */
@keyframes spinner-rotation {
  0% {
    transform: rotate(0);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* アラート */
.alert {
  padding: 1.2rem;
  margin-bottom: 2rem;
  border-radius: 4px;
  font-size: 1.4rem;
}
.alert-danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}
.alert-err {
  color: #c62828;
}
.alert-link {
  color: #1a4480;
  text-decoration: underline;
}
@media screen and (min-width: 768px){
  .form-card {
    padding: 5rem;
  }
  .form-submit {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media screen and (min-width: 992px){
  .form-layout {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-text {
    padding: clamp(2rem, 10vh, 10rem) 0 0;
  }
}