/* ============================
   お問い合わせページ共通: タイトル上マージン
============================ */
#page-contact .section-title-h3,
#page-product .section-title-h3,
#page-corporate .section-title-h3,
#page-media .section-title-h3,
#page-collaboration .section-title-h3,
#page-sponsorship .section-title-h3,
#page-joint-research .section-title-h3,
#page-municipality .section-title-h3,
#page-disaster-relief .section-title-h3 {
  margin-top: 7.8%;
}

/* ============================
   お問い合わせTOP
============================ */
.contact-header-txt {
  font-size: clamp(1rem, 0.873rem + 0.52vw, 1.5rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  line-height: clamp(1.75rem, 1.463rem + 1.18vw, 2.875rem);
  margin-top: clamp(2.5rem, 2.181rem + 1.31vw, 3.75rem);
}

.contact-links {
  width: 100%;
  margin-top: clamp(2.5rem, 2.181rem + 1.31vw, 3.75rem);
}

.contact-link-list {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  width: 100%;
  margin: 0 auto;
}

.contact-link-list li {
  width: 49%;
}

.contact-link-list li:nth-child(n+3) {
  margin-top: 2%;
}

li .small-more-link {
  justify-content: space-between;
  width: 100%;
  height: auto;
  background: #F3F3F3;
  padding: 3.997% 6.3%;
  border-radius: clamp(1rem, 0.936rem + 0.26vw, 1.25rem);
}

.contact-links-text {
  width: 80%;
  text-align: left;
  line-height: clamp(1.188rem, 1.108rem + 0.33vw, 1.5rem);
}

@media (max-width: 768px) {
  .contact-link-list {
    display: block;
  }

  .contact-link-list li {
    width: 100%;
  }

  .contact-link-list li:nth-child(n+2) {
    margin-top: 4.57%;
  }

  li .small-more-link {
    padding: 4% 6.86% 4% 9.14%;
  }

  .contact-links-text {
    font-weight: 500;
  }
}


/* ============================
   商品に関するお問い合わせ
============================ */
.contact-form-wrapper {
  width: 100%;
  margin-top: clamp(3rem, 2.809rem + 0.78vw, 3.75rem);
}

.form-radio-title {
  text-align: right;
  font-size: clamp(0.75rem, 0.718rem + 0.13vw, 0.875rem);
  font-weight: 500;
  margin-bottom: clamp(0rem, -0.048rem + 0.2vw, 0.188rem);
}

.contact-form-txt {
  font-size: clamp(1rem, 0.968rem + 0.13vw, 1.125rem);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-top: clamp(1.5rem, 1.373rem + 0.52vw, 2rem);
}

.contact-form-txt-top {
  margin: 0;
}

.required {
  color: #BA2A20;
}

.wpcf7-form-control-wrap {
  display: block;
  margin-top: clamp(0.688rem, 0.544rem + 0.59vw, 1.25rem);
}

/* ラジオボタン */
.wpcf7-list-item {
  margin-right: 36px;
}

/* 横並び＆テキスト整列 */
.wpcf7-radio label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
}

/* ラジオボタン本体をカスタム */
.wpcf7-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background-color: #D9D9D9;
  cursor: pointer;
  position: relative;
  margin: 0;
}

/* チェック時 */
.wpcf7-radio input[type="radio"]:checked {
  background-color: #BA2A20;
  box-shadow: inset 0 0 0 2.5px #D9D9D9;
  outline: none;
}

.wpcf7-list-item-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.screen-reader-response {
  display: none;
}

.wpcf7-text {
  background: #F3F3F3;
  color: #050505;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  width: 100%;
  padding: 10px 20px;
}

.wpcf7-select {
  cursor: pointer;
  background-color: #F3F3F3;
  color: #050505;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  width: 100%;
  padding: 10px 20px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('../../images/contact-input-arrow.svg');
  background-repeat: no-repeat;
  background-position: right 16px center;
  /* ← ここで位置調整（内側に） */
  background-size: 16px;
  outline: none;
}

.wpcf7-textarea {
  background: #F3F3F3;
  color: #050505;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  width: 100%;
  padding: 10px 20px;
  height: 9.375vw;
}

/* ファイル添付 */
.file-upload-box {
  position: relative;
  width: 100%;
  height: 80px;
  border: 1px solid #050505;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

@media (hover: hover) {
  .file-upload-box:hover {
    opacity: 0.7;
    transition: opacity 0.3s ease;
  }
}

.file-upload-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

/* 表示テキスト部分 */
.file-upload-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  pointer-events: none;
  color: #050505;
  font-family: inherit;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* 左側（大きめ文字） */
.file-upload-label .file-main {
  font-size: clamp(0.875rem, 0.811rem + 0.26vw, 1.125rem);
  letter-spacing: 0.1em;
  font-weight: 500;
  color: #050505;
}

/* 右側（小さめ文字） */
.file-upload-label .file-sub {
  font-size: clamp(0.75rem, 0.718rem + 0.13vw, 0.875rem);
  letter-spacing: 0.1em;
  font-weight: 500;
  color: #050505;
}

.selected-file-name {
  margin-top:15px;
  font-size: clamp(0.875rem, 0.811rem + 0.26vw, 1.125rem);
  color: #050505;
  font-weight: 500;
  text-align: center;
  word-break: break-all;
}

/* ファイルサイズエラーメッセージ */
.file-size-error {
  margin-top: 15px;
  text-align: center;
}

/* チェックボックスとテキスト配置 */
.privacy-check {
  margin: clamp(3.375rem, 3.248rem + 0.52vw, 3.875rem) auto clamp(2.125rem, 1.998rem + 0.523vw, 2.625rem) auto;
  text-align: center;

  .wpcf7-form-control-wrap {
    margin: 0;
    display: inline-block;
  }
}

@media (max-width: 768px) {
  .privacy-check {
    margin: clamp(3.375rem, 3.248rem + 0.52vw, 3.875rem) auto clamp(3.375rem, 3.248rem + 0.52vw, 3.875rem) auto;
  
    .wpcf7-form-control-wrap {
      margin: 0;
    }
  }
}
.privacy-check label {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.privacy-check input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: #050505;
  margin: 0;
}

.privacy-label {
  color: #050505;

  .wpcf7-list-item-label {
    font-size: clamp(0.875rem, 0.843rem + 0.13vw, 1rem);
    font-weight: 500;
    letter-spacing: 0.1em;
  }
}

/* label要素に直接privacy-labelクラスが付く場合（Salesforceフォーム等） */
label.privacy-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.privacy-label a {
  color: #BA2A20;
  font-family: "Noto Sans JP";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  letter-spacing: 1.6px;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  transition: text-decoration 0.2s ease;
}

.privacy-label a:hover {
  text-decoration: none;
}

/* カスタムバリデーションエラーメッセージ */
.custom-error-message {
  display: block;
  color: #BA2A20;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: normal;
  line-height: 1.5;
  margin-top: 10px;
}

/* プライバシーチェックボックスのバリデーションエラー */
.privacy-check .wpcf7-not-valid-tip,
.privacy-check .privacy-error-message {
  display: block;
  color: #BA2A20;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: normal;
  line-height: 1.5;
  margin-top: 10px;
  text-align: center;
}

/* ボタン */
.submit-button {
  text-align: center;
  /*margin: clamp(1.5rem, 0.911rem + 2.42vw, 3.813rem) auto 0 auto;*/
}

.submit-button-inner {
  position: relative;
  display: inline-block;
  transition: opacity 0.3s ease;
}
@media (hover: hover) {
  .submit-button-inner:hover { opacity: 0.7; }
}

/* input本体 */
.submit-button-inner input[type="submit"] {
  background: #000;
  color: #fff;
  font-size: clamp(1rem, 0.936rem + 0.26vw, 1.25rem);
  letter-spacing: 0.1em;
  font-weight: 600;
  width: 348px;
  height: 60px;
  border-radius: 31.5px;
  border: none;
  cursor: pointer;
  text-align: center;
}

/* 丸の中にSVG矢印を配置 */
.submit-button-inner::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 28px;
  transform: translateY(-50%);
  width: 32px;
  height: 34px;
  border-radius: 50%;
  background: url('../../images/contact-submit-arrow.svg') no-repeat center center;
}

/* Chrome/Edge のオートフィル青背景を無効化 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px #F3F3F3 inset !important;
  transition: background-color 9999s ease-in-out 0s !important;
}

/* CF7標準エラーは非表示（カスタムバリデーションを使用） */
.wpcf7-not-valid-tip {
  display: none !important;
}

/* ラジオボタンのエラーだけ表示（カスタムバリデーション対象外のため） */
.wpcf7-radio + .wpcf7-not-valid-tip {
  display: block !important;
  color: #BA2A20;
  font-size: 14px;
  margin-top: 10px;
}

.wpcf7-response-output {
  display: none;
}

@media (max-width: 768px) {
  .wpcf7-list-item {
    display: block;
  }

  .wpcf7-list-item:nth-of-type(1) {
    margin: 18px 0 0 0;
  }

  .wpcf7-list-item:nth-of-type(n+2) {
    margin: 12px 0 0 0;
  }

  .wpcf7-radio input[type="radio"] {
    width: 24px;
    height: 24px;
  }

  .wpcf7-text {
    padding: 15px 20px;
  }

  .wpcf7-select {
    padding: 15px 20px;
  }

  .wpcf7-textarea {
    height: 42.055vw;
    padding: 15px 20px;
  }

  .file-upload-label {
    display: block;
    white-space: wrap;
  }

  .file-upload-label {
    width: 87.6%;
    text-align: center;
  }

  .file-upload-label .file-main {
    display: block;
  }

  .file-upload-label .file-sub {
    display: block;
  }

  .submit-button-inner input[type="submit"] {
    width: 310px;
  }

  .submit-button-inner::after {
    width: 28px;
    height: 30px;
    background: url('../../images/contact-submit-arrow-sp.svg') no-repeat center center;
  }
}


/* ============================
   商品に関するお問い合わせ（thanksページ）
============================ */
.thanks-text-box {
  text-align: center;
  margin-top: clamp(1.813rem, 1.271rem + 2.22vw, 3.938rem);
}

.thanks-text {
  font-size: 16px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 0.1em;
}

/* ボタン全体 */
.thanks-btn {
  text-align: center;
  margin-top: clamp(2rem, 1.554rem + 1.83vw, 3.75rem);
}

.thanks-btn-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #050505;
  color: #fff;
  font-weight: 600;
  font-size: clamp(1rem, 0.936rem + 0.26vw, 1.25rem);
  letter-spacing: 0.1em;
  border-radius: 31.5px;
  width: 368px;
  height: 60px;
  text-decoration: none;
}

/* --- 丸い矢印アイコン --- */
.thanks-arrow {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 棒部分（―） */
.thanks-arrow-line {
  position: absolute;
  width: 6px;
  height: 2px;
  background: #fff;
  left: 12px;
}

/* 先端部分（くの字） */
.thanks-arrow-head {
  position: absolute;
  width: 6px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  left: 10px;
}

@media (max-width: 768px) {
  .thanks-text {
    letter-spacing: 0.05em;
    line-height: 36px;
  }

  .thanks-btn-link {
    width: 310px;
  }

  .thanks-arrow {
    width: 28px;
    height: 28px;
  }

  .thanks-arrow-line {
    width: 5px;
    left: 11px;
  }

  .thanks-arrow-head {
    left: 9px;
  }
}

/* ============================
   法人様からのお問い合わせ（Salesforce）
============================ */
.name-row {
  display: flex;
  gap: 2%;
}

.name-field {
  flex: 1;
}

@media (max-width: 768px) {
  .name-row {
    flex-direction: column;
    gap: 0;
  }

  .name-field:nth-child(2) .contact-form-txt {
    margin-top: clamp(1.5rem, 1.373rem + 0.52vw, 2rem);
  }
}