/* --- コンテナと基本設定 --- */
.webform-submission-form {
  margin: 30px auto 10px !important;
  padding: 15px !important;
  border: 1px solid #ccc;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Webformフォームの基本スタイル --- */
.webform-submission-form {
  padding: 0;
  margin: 0;
}

/* --- プログレスバー --- */
.progress-step.is-active .progress-marker::before {
  background-color: #FFD200 !important;
}

.progress-marker::before {
  width: 30px;
  height: 30px;
}

.progress-marker::after {
  top: 14px;
}

.progress-step .progress-marker {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.progress-tracker {
    margin: 0px auto;
}

.progress-text {
  font-size: 12px;
}

@media (max-width: 600px) {
}


/* --- フォーム項目 --- */
form.webform-submission-form .form-wrapper {
  max-width: 500px;
  margin: 1rem auto 0rem
}

.checkboxes--wrapper {
  form.webform-submission-form .form-wrapper {
    margin-top: 1rem!important;
  }
}

form.webform-submission-form .form-wrapper p {
  text-align: center;
  margin: 25px;
  line-height: 1.4;
  font-size: 15px;
}

@media (max-width: 580px) {
  form.webform-submission-form .form-wrapper p {
    margin: 25px 0px;
  }
}

.form-item-search-form-condition-6 {
  margin: 2rem auto;
  max-width: 500px;
}

.form-item-search-form-condition-6 label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: bold;
  color: #333;
}

.form-item-search-form-condition-6 select.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.41 0L6 4.58 10.59 0 12 1.41 6 7.41 0 1.41z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-item-search-form-condition-6 select.form-select:focus {
  outline: none;
  border-color: #808080;
  box-shadow: 0 0 0 3px rgba(0, 116, 217, 0.2);
}

/* チェックボックス全体のラップ */
form.webform-submission-form .fieldset-wrapper .form-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    padding: 10px 50px 20px;
    border-radius: 8px;
}

@media (max-width: 580px) {
  form.webform-submission-form .fieldset-wrapper .form-checkboxes {
    padding: 10px 0px 20px;
  }
}


/* 個々のチェックボックス */
form.webform-submission-form .form-type-checkbox {
  display: flex;
  align-items: center;
  font-size: 16px;
}


/* チェックボックスの見た目 */
form.webform-submission-form .form-type-checkbox input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #999;
  border-radius: 4px;
  margin-right: 10px;
  cursor: pointer;
  position: relative;
  background-color: #fff;
  transition: all 0.2s ease;
}

/* チェック状態の赤色表示 */
form.webform-submission-form .form-type-checkbox input[type="checkbox"]:checked {
  background-color: #fff;
  border-color: #d00;
}

form.webform-submission-form .form-type-checkbox input[type="checkbox"]:checked::after {
  content: "✔";
  color: #d00;
  font-size: 16px;
  font-weight: bold;
  position: absolute;
  top: -2px;
  left: 3px;
}

/* ラベルのスタイル */
form.webform-submission-form .form-type-checkbox label.option {
  cursor: pointer;
  font-weight: 500;
  color: #333;
}

/* 見出しのスタイル */
.fieldset-legend {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  display: block;
  color: #222;
}

/* --- ラベル --- */


/* --- セレクトボックス --- */


/* --- ボタンエリア --- */
.form-actions {
  text-align: center;
  margin-top: 30px;
}

/* 実際のボタン要素をインラインブロックにして中央化 */
.webform-button--next,
.webform-button--submit,
.webform-button--previous {
  display: inline-block;
  margin: 0 auto;
  float: none;
}

/* 余計なfloat解除 */
.webform-actions:after {
  content: "";
  display: table;
  clear: both;
}

/* --- 「次へ」ボタン --- */
.webform-button--next {
  margin-left: 0 !important; /* Webformのデフォルトマージンをリセット */
  flex-basis: 30%; /* 親要素の30%の幅を基準にする */
  max-width: 150px; /* 必要に応じて最大幅を設定 */
  order: 2; /* 右側 */
  text-align: center; /* ボタン内のテキストを中央揃え */
}

/* --- サブミットボタン --- */
.webform-submission-form input[type="submit"] {
  display: inline-block;
  background-color: #808080; /* accent-color */
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 150px;
}

.webform-submission-form input[type="submit"]:hover {
  background-color: #4a6370; /* ホバー時の色を少し濃く */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Drupalの隠し要素の調整 --- */
.visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

/* コンテキストリンクを非表示 */
.contextual {
  display: none;
}

/* ここから下に追加 */
[type=checkbox],
[type=radio] {
  display: none;
}

@media screen and (max-width: 579px) {
  form.webform-submission-form .form-type-checkbox {
    font-size: 14px;
  }
}

.form-type-checkbox input[type=checkbox]:checked + label.option,
.form-type-radio input[type=radio]:checked + label.option {
  background-color: #ff7335 !important;
  color: #fff;
}

#edit-search-form-condition-3 label.option,
#edit-search-form-condition-4--wrapper label.option {
  cursor: pointer;
  font-weight: 500;
  color: #333;
  background-color: #d9d9d9;
  padding: 0.8rem 0;
  border-radius: 20px;
  width: 100%;
  text-align: center;
  font-weight: bold !important;
  display: block;
}

#edit-search-form-condition-4--wrapper .form-radios {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0px 10px;
  padding: 10px 0px 20px;
  border-radius: 8px;
}
@media screen and (max-width: 579px) {
  #edit-search-form-condition-4--wrapper .form-radios {
    gap: 0px 9px;
    padding: 10px 0px 20px;
  }
}

.form-item-search-form-condition-6 select.form-select,
select.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("/sites/default/files/inline-images/hakenm-icon-select.jpg");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 20px;
  cursor: pointer;
  -webkit-transition: border-color 0.2s, -webkit-box-shadow 0.2s;
  transition: border-color 0.2s, -webkit-box-shadow 0.2s;
  transition: border-color 0.2s, box-shadow 0.2s;
  transition: border-color 0.2s, box-shadow 0.2s, -webkit-box-shadow 0.2s;
}

form.webform-submission-form .fieldset-wrapper .form-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0px 10px;
  padding: 10px 0px 20px;
  border-radius: 8px;
}
@media screen and (max-width: 579px) {
  form.webform-submission-form .fieldset-wrapper .form-checkboxes {
    gap: 0px 5px !important;
    padding: 10px 0px 20px;
  }
}

.fieldset-legend {
  line-height: 1.5;
  margin-bottom: 0 !important;
  font-size: 20px;
  display: block;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

#edit-search-form-condition-4--wrapper-legend .fieldset-legend {
  position: relative;
  margin-bottom: 0px;
  font-size: 20px;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  width: 100%;
  -ms-flex-wrap: nowrap;
      flex-wrap: nowrap;
}
#edit-search-form-condition-4--wrapper-legend .fieldset-legend::before {
  content: "";
  display: inline-block;
  background-image: url("/sites/default/files/inline-images/hakenm-step01.png");
  background-size: cover;
  background-repeat: no-repeat;
  width: 55px;
  height: 50px;
  margin-right: 7px;
}

#edit-search-form-condition-3--wrapper legend .fieldset-legend {
  position: relative;
  margin-bottom: 0px;
  font-size: 20px;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  width: 100%;
  -ms-flex-wrap: nowrap;
      flex-wrap: nowrap;
}
#edit-search-form-condition-3--wrapper legend .fieldset-legend::before {
  content: "";
  display: inline-block;
  background-image: url("/sites/default/files/inline-images/hakenm-step02.png");
  background-size: cover;
  background-repeat: no-repeat;
  width: 55px;
  height: 50px;
  margin-right: 7px;
}

.form-item-search-form-condition-6 label {
  position: relative;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.form-item-search-form-condition-6 label::before {
  content: "";
  display: inline-block;
  background-image: url("/sites/default/files/inline-images/hakenm-step03.png");
  background-size: cover;
  background-repeat: no-repeat;
  width: 55px;
  height: 50px;
  margin-right: 7px;
}

.form-item-search-form-condition-5 label {
  position: relative;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: bold;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.form-item-search-form-condition-5 label::before {
  content: "";
  display: inline-block;
  background-image: url("/sites/default/files/inline-images/hakenm-step04_0.png");
  background-size: cover;
  background-repeat: no-repeat;
  width: 55px;
  height: 50px;
  margin-right: 7px;
}

.webform-submission-form input[type=submit] {
  display: inline-block;
  background-color: #ee0404;
  color: #fff;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  -webkit-transition: background-color 0.3s ease, -webkit-box-shadow 0.3s ease;
  transition: background-color 0.3s ease, -webkit-box-shadow 0.3s ease;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, -webkit-box-shadow 0.3s ease;
  min-width: 150px;
}

.webform-submission-form input[type=submit]:hover {
  background-color: #8a0000;
  -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-item-search-form-condition-5,
.form-item-search-form-condition-6 {
  margin: 20px auto;
  max-width: 500px;
  padding-bottom: 30px;
}

.webform-submission-form {
  margin: 10px auto 10px !important;
}

#edit-search-form-condition-4--wrapper,
#edit-search-form-condition-3--wrapper,
.form-item-search-form-condition-5,
.form-item-search-form-condition-6 {
  border-bottom: 1px solid #d0cecd;
}