/* =====================================================================
   Insight資料ダウンロードフォーム専用CSS
   ===================================================================== */

/* ---------------------------------------------------------------------
   ベースリセット
   --------------------------------------------------------------------- */
.p-insightForm,
.p-insightForm *,
.p-insightForm *::before,
.p-insightForm *::after {
  box-sizing: border-box;
}

/* ---------------------------------------------------------------------
   メインビジュアル
   --------------------------------------------------------------------- */
.p-insightForm__mv {
  padding: 60px 0 40px;
  text-align: center;
}

.p-insightForm__mv--sub {
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.p-insightForm__mv--head {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ---------------------------------------------------------------------
   メインセクション
   --------------------------------------------------------------------- */
.p-insightForm__main {
  padding-bottom: 120px;
}

.p-insightForm__main--inner {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

/* ---------------------------------------------------------------------
   2カラムレイアウト（PC: 3:7）
   --------------------------------------------------------------------- */
main.p-insightForm .p-insightForm__main--inner .p-insightForm__row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  flex-wrap: nowrap;
  width: 100%;
  flex-direction: row;
  margin-top: 0;
  padding-top: 0;
}

main.p-insightForm .p-insightForm__row > .p-insightForm__col--left {
  flex: 0 0 300px;
  max-width: 300px;
  width: 300px;
  min-width: 0;
  position: -webkit-sticky;
  align-self: flex-start;
  margin-top: 0;
  padding-top: 0;
}

main.p-insightForm .p-insightForm__row > .p-insightForm__col--right {
  flex: 1 1 auto;
  max-width: calc(100% - 340px);
  min-width: 0;
  overflow: hidden;
  margin-top: 0;
  padding-top: 0;
}

/* ---------------------------------------------------------------------
   資料情報カード
   --------------------------------------------------------------------- */
.p-insightForm__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  border-radius: 12px;
}

.p-insightForm__card--img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.p-insightForm__card--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.p-insightForm__card--content {
  flex: 1;
  width: 100%;
}

.p-insightForm__card--label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background-color: #004896;
  padding: 4px 12px;
  border-radius: 100vh;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.p-insightForm__card--title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #333;
  margin-bottom: 10px;
  text-align: left;
}

.p-insightForm__card--desc {
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  text-align: left;
}

/* ---------------------------------------------------------------------
   フォームセクション
   --------------------------------------------------------------------- */
.p-insightForm__formWrap {
  background-color: #F5F6F7;
  padding: 50px 40px 60px;
  border-top: 5px solid #004896;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.p-insightForm__formHead {
  text-align: center;
  margin-bottom: 40px;
}

.p-insightForm__formHead--txt {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 20px;
}

.p-insightForm__formHead--note {
  font-size: 14px;
  color: #666;
}

.p-insightForm__formHead--required {
  color: #E84343;
  font-weight: 700;
}

.p-insightForm__formContent {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}

/* ---------------------------------------------------------------------
   Contact Form 7 スタイル上書き（contact.css/lp.css干渉防止）
   --------------------------------------------------------------------- */
.p-insightForm .p-insightForm__cf7 {
  width: 100% !important;
  max-width: 100% !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table,
.p-insightForm .p-insightForm__cf7 > div {
  width: 100% !important;
  max-width: 100% !important;
}

/* フォームdlレイアウト - 横並び */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl,
.p-insightForm .p-insightForm__cf7 dl {
  margin-top: 10px !important;
  display: flex !important;
  justify-content: space-between !important;
  font-size: 16px !important;
  line-height: 1.52 !important;
  width: 100% !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl:first-child,
.p-insightForm .p-insightForm__cf7 dl:first-of-type {
  margin-top: 0 !important;
}

/* ラベル（dt） */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dt,
.p-insightForm .p-insightForm__cf7 dl dt {
  font-weight: 700 !important;
  width: 180px !important;
  flex-shrink: 0 !important;
  padding-top: 9px !important;
  color: #333 !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dt .--required,
.p-insightForm .p-insightForm__cf7 dl dt .--required {
  color: #E84343 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  margin-left: 4px !important;
  transform: translate(0, -5px) !important;
  display: inline-block !important;
}

/* 入力欄（dd） */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dd,
.p-insightForm .p-insightForm__cf7 dl dd {
  width: calc(100% - 180px) !important;
  max-width: calc(100% - 180px) !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dd .wpcf7-form-control-wrap,
.p-insightForm .p-insightForm__cf7 dl dd .wpcf7-form-control-wrap {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* 名前欄 - 横並び */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--name dd,
.p-insightForm .p-insightForm__cf7 dl.--name dd {
  display: flex !important;
  gap: 10px !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--name dd .wpcf7-form-control-wrap,
.p-insightForm .p-insightForm__cf7 dl.--name dd .wpcf7-form-control-wrap {
  flex: 1 !important;
  min-width: 0 !important;
}

/* チェックボックス・ラジオボタン */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--check dd,
.p-insightForm .p-insightForm__cf7 dl.--check dd,
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--radio dd,
.p-insightForm .p-insightForm__cf7 dl.--radio dd {
  padding-top: 9px !important;
}

.p-insightForm .p-insightForm__cf7 input[type=text],
.p-insightForm .p-insightForm__cf7 input[type=tel],
.p-insightForm .p-insightForm__cf7 input[type=email],
.p-insightForm .p-insightForm__cf7 select,
.p-insightForm .p-insightForm__cf7 textarea {
  background-color: #fff !important;
  border: 1px solid #d2d2d2 !important;
  padding: 12px 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-sizing: border-box !important;
}

.p-insightForm .p-insightForm__cf7 input:focus,
.p-insightForm .p-insightForm__cf7 select:focus,
.p-insightForm .p-insightForm__cf7 textarea:focus {
  outline: none !important;
  border-color: #004896 !important;
  box-shadow: 0 0 0 3px rgba(0, 72, 150, 0.1) !important;
}

.p-insightForm .p-insightForm__cf7 textarea {
  resize: vertical !important;
  min-height: 140px !important;
}

.p-insightForm .p-insightForm__cf7 ::placeholder {
  color: #aaa !important;
}

/* ラジオボタン */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--radio dd {
  padding-top: 8px !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio .wpcf7-list-item {
  margin: 0 !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio input[type="radio"] {
  display: none !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio .wpcf7-list-item-label {
  position: relative !important;
  padding-left: 28px !important;
  cursor: pointer !important;
  line-height: 1.5 !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio .wpcf7-list-item-label::before {
  content: '' !important;
  position: absolute !important;
  left: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  border: 2px solid #d2d2d2 !important;
  border-radius: 50% !important;
  background: #fff !important;
  transition: border-color 0.2s !important;
  display: block !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio .wpcf7-list-item-label::after {
  content: '' !important;
  position: absolute !important;
  left: 4px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  background: #004896 !important;
  opacity: 0 !important;
  transition: opacity 0.2s !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::before {
  border-color: #004896 !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label::after {
  opacity: 1 !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-radio input[type="radio"]:checked + .wpcf7-list-item-label {
  font-weight: 700 !important;
  color: #004896 !important;
}

/* テキストエリア */
.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--textarea dd {
  margin-top: 0 !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--textarea textarea {
  min-height: 120px !important;
}

.p-insightForm .p-insightForm__cf7 .p-lp__form--table dl.--textarea textarea {
  line-height: 1.4 !important;
}

/* 同意チェックボックス */
.p-insightForm .p-insightForm__cf7 .p-contact__form--agreement {
  margin-top: 40px !important;
  text-align: center !important;
  font-size: 14px !important;
}

.p-insightForm .p-insightForm__cf7 .p-lp__form--agreement {
  margin-top: 20px !important;
  text-align: center !important;
}

.p-insightForm .p-insightForm__cf7 .p-lp__form--agreement span.wpcf7-list-item-label::before {
  background-color: #fff !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--agreement a {
  color: #004896 !important;
  text-decoration: underline !important;
}

/* 同意チェックボックスのラベル */
.p-insightForm .p-insightForm__cf7 .p-contact__form--agreement span.wpcf7-list-item-label {
  padding-left: 26px !important;
  position: relative !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--agreement span.wpcf7-list-item-label::before {
  display: block !important;
  content: '' !important;
  height: 14px !important;
  left: 0 !important;
  position: absolute !important;
  top: 50% !important;
  width: 14px !important;
  border: #d2d2d2 solid 1px !important;
  border-radius: 2px !important;
  transform: translate(0px, -50%) !important;
  background-color: #fff !important;
}

/* 送信ボタン */
.p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper,
.p-insightForm .p-insightForm__cf7 .p-lp__form--btnWrapper {
  text-align: center !important;
  margin-top: 30px !important;
}

.p-insightForm .p-insightForm__cf7 .p-lp__form--btn {
  display: inline-block !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper input[type="submit"],
.p-insightForm .p-insightForm__cf7 .p-lp__form--btnWrapper input[type="submit"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background-color: #004896 !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  width: 280px !important;
  max-width: 100% !important;
  height: 60px !important;
  border-radius: 100vh !important;
  border: none !important;
  cursor: pointer !important;
  transition: background-color 0.3s, transform 0.2s !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper input[type="submit"]:hover,
.p-insightForm .p-insightForm__cf7 .p-lp__form--btnWrapper input[type="submit"]:hover {
  background-color: #003570 !important;
  transform: translateY(-2px) !important;
}

.p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper input[type="submit"]:disabled,
.p-insightForm .p-insightForm__cf7 .p-lp__form--btnWrapper input[type="submit"]:disabled {
  background-color: #8D9EB1 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* エラーメッセージ */
.p-insightForm .p-insightForm__cf7 .wpcf7-not-valid-tip {
  font-size: 12px !important;
  color: #E84343 !important;
  margin-top: 5px !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-response-output {
  margin: 20px 0 0 !important;
  padding: 15px 20px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  text-align: center !important;
}

.p-insightForm .p-insightForm__cf7 .wpcf7-mail-sent-ok {
  background-color: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724 !important;
}

/* LP形式フォームのレイアウト上書き */
.p-insightForm .p-lpMv__form--inner {
  max-width: 100% !important;
  width: 100% !important;
}

.p-insightForm .p-lpMv__form.--02 .p-lp__form--table dl dt {
  width: 180px !important;
}

.p-insightForm .p-lpMv__form.--02 .p-lp__form--table dl dd {
  width: calc(100% - 180px) !important;
}

/* ---------------------------------------------------------------------
   記事に戻るリンク
   --------------------------------------------------------------------- */
.p-insightForm__back {
  text-align: center;
  margin-top: 24px;
}

.p-insightForm__back--link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #004896;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid #004896;
  border-radius: 100vh;
  transition: background-color 0.3s, color 0.3s;
}

.p-insightForm__back--link:hover {
  background-color: #004896;
  color: #fff;
  opacity: 1;
}

.p-insightForm__back--link::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* ---------------------------------------------------------------------
   レスポンシブ（タブレット 1024px以下）
   --------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .p-insightForm__mv {
    padding: 40px 0 30px;
  }

  .p-insightForm__mv--sub {
    font-size: 12px;
  }

  .p-insightForm__mv--head {
    font-size: 24px;
  }

  .p-insightForm__main {
    padding-bottom: 80px;
  }

  /* 2カラム → 1カラム */
  main.p-insightForm .p-insightForm__main--inner .p-insightForm__row {
    flex-direction: column;
    gap: 30px;
  }

  main.p-insightForm .p-insightForm__row > .p-insightForm__col--left {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    position: static;
  }

  main.p-insightForm .p-insightForm__row > .p-insightForm__col--right {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  /* 資料カード - 横並び */
  .p-insightForm__card {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 10px;
  }

  .p-insightForm__card--img {
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
  }

  .p-insightForm__card--title {
    font-size: 16px;
  }

  .p-insightForm__card--desc {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  /* フォーム */
  .p-insightForm__formWrap {
    padding: 30px 20px 40px;
  }

  .p-insightForm__formHead {
    margin-bottom: 30px;
  }

  .p-insightForm__formHead--txt {
    font-size: 14px;
    line-height: 1.7;
  }

  .p-insightForm__formHead--txt .br-sp-only {
    display: inline;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--table dl {
    display: block !important;
    margin-top: 10px !important;
    font-size: 14px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dt {
    width: 100% !important;
    padding-top: 0 !important;
    margin-bottom: 5px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--table dl dd {
    width: 100% !important;
    max-width: 100% !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--name dd {
    display: flex !important;
    gap: 10px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--table dl.--check dd {
    padding-top: 0 !important;
  }

  .p-insightForm .p-insightForm__cf7 input[type=text],
  .p-insightForm .p-insightForm__cf7 input[type=tel],
  .p-insightForm .p-insightForm__cf7 input[type=email],
  .p-insightForm .p-insightForm__cf7 select,
  .p-insightForm .p-insightForm__cf7 textarea {
    padding: 10px 12px !important;
    font-size: 14px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--agreement {
    margin-top: 30px !important;
    font-size: 12px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper {
    margin-top: 20px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-contact__form--btnWrapper input[type="submit"] {
    width: 100% !important;
    max-width: 280px !important;
    height: 54px !important;
    font-size: 15px !important;
  }

  /* LP形式フォームも1カラムに */
  .p-insightForm .p-insightForm__cf7 .p-lp__form--table dl,
  .p-insightForm .p-lpMv__form--inner .p-lp__form--table dl {
    display: block !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-lp__form--table dl dt,
  .p-insightForm .p-lpMv__form--inner .p-lp__form--table dl dt,
  .p-insightForm .p-lpMv__form.--02 .p-lp__form--table dl dt {
    width: 100% !important;
    padding-top: 0 !important;
    margin-bottom: 5px !important;
  }

  .p-insightForm .p-insightForm__cf7 .p-lp__form--table dl dd,
  .p-insightForm .p-lpMv__form--inner .p-lp__form--table dl dd,
  .p-insightForm .p-lpMv__form.--02 .p-lp__form--table dl dd {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 5px !important;
  }

  /* 戻るリンク */
  .p-insightForm__back {
    margin-top: 20px;
  }

  .p-insightForm__back--link {
    font-size: 14px;
    padding: 10px 20px;
  }
}

/* ---------------------------------------------------------------------
   レスポンシブ（スマホ 768px以下）
   --------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
  /* 資料カードを縦積みに */
  .p-insightForm__card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .p-insightForm__card--img {
    width: 100%;
    max-width: 280px;
    min-width: auto;
  }

  .p-insightForm__card--title {
    text-align: left;
  }

  .p-insightForm__card--desc {
    text-align: left;
  }
}

/* PCでは改行を非表示 */
@media screen and (min-width: 1025px) {
  .p-insightForm__formHead--txt .br-sp-only {
    display: none;
  }
}
