/*
********************************************************************************
メールフォームのスタイル
********************************************************************************
*/

/*
--------------------------------------------------
フォームパーツ
--------------------------------------------------
*/
input,
textarea,
select {
  border: 1px solid #ccc;
  padding: 8px 10px;
  border-radius: 4px;
  background: #fff;
  font-size: 16px;
  max-width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #999;
  outline: none;
}

textarea {
  width: 100%;
}

/*
--------------------------------------------------
モーダルエリア
--------------------------------------------------
*/
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal-content {
  background: #fff;
  padding: 30px 20px 40px;
  border-radius: 8px;
  width: 96%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  word-break: break-all;
}

.modal-content .modal-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 2em;
  text-align: center;
}

.modal-content .table {
  width: 100%;
  margin-bottom: 40px;
}

.modal-content .table .th,
.modal-content .table .td {
  display: block;
  padding: 1em;
}

.modal-content .table .th {
  width: 100%;
  font-weight: bold;
  text-align: left;
  background: #eee;
  border-top: 1px solid #c5c6c6;
  border-bottom: 1px solid #c5c6c6;
}

.modal-content .table .td {
  width: 100%;
  min-height: 3.4em;
}

.modal-content .btn-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-content .btn-wrap p {
  margin: 2px 5px;
}

.modal-content .btn-wrap p a {
  cursor: pointer;
}

.modal-content .btn-wrap .back a {
  background: #707070;
}

/*
--------------------------------------------------
フォームレイアウト
--------------------------------------------------
*/
.form-wrap {
}

.form-wrap .form-input {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
}

.form-wrap .form-input .tr {
  width: 100%;
  margin-bottom: 30px;
}

.form-wrap .form-input .th {
  font-weight: bold;
  margin-bottom: 10px;
}

.form-wrap .form-input .td input {
  width: 100%;
}

.form-wrap .form-input .td input.w-small {
  max-width: 250px;
}

.form-wrap .form-input .required {
  font-size: 12px;
  color: #fff;
  background: #e63232;
  margin-left: 1em;
  padding: 0.2em 0.5em;
  border-radius: 5px;
}

.form-wrap .form-input .hint {
  display: block;
  /*font-size: 13px;*/
  color: #707070;
  padding-top: 0.3em;
}

.form-wrap .form-input .error {
  display: block;
  /*font-size: 13px;*/
  color: #e63232;
  padding-top: 0.3em;
}

.form-wrap .acceptance {
  margin-top: 40px;
  font-weight: bold;
}

.form-wrap .acceptance span {
  margin: 0;
}

.form-wrap .acceptance .error {
  display: block;
  /*font-size: 13px;*/
  color: #e63232;
  padding-top: 0.3em;
  font-weight: normal;
}

/* CF7のメッセージ表示 */
.form-wrap .form-input .wpcf7-not-valid-tip {
  display: block;
  /*font-size: 13px;*/
  color: #e63232;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
  width: 80%;
  margin: 0 auto 80px;
  border: 1px dashed #e63232;
  padding: 1em;
  text-align: center;
}

.wpcf7-form.sent .wpcf7-response-output {
  width: 80%;
  margin: 0 auto 80px;
  border: 1px dashed #707070 !important;
  padding: 1em;
  text-align: center;
}

/* alpine側のエラーが表示されているときはCF7のエラーは表示しない */
.form-wrap
  .form-input
  .td:has(.error:not([style*="display: none"]))
  .wpcf7-not-valid-tip {
  display: none;
}

.form-wrap .form-input .text-count {
  display: block;
  text-align: right;
}

.form-wrap .btn-wrap {
  display: flex;
  justify-content: center;
}

.form-wrap .btn-wrap p a {
  cursor: pointer;
}
