@charset "UTF-8";
/*
    Template: swell
    Theme Name: SWELL CHILD
    Theme URI: https://swell-theme.com/
    Description: SWELLの子テーマ
    Version: 1.0.0
    Author: LOOS WEB STUDIO
    Author URI: https://loos-web-studio.com/

    License: GNU General Public License
    License URI: http://www.gnu.org/licenses/gpl.html
*/
/* =========================================================
   Contact Form 7 スタイルアップ + 印刷対応 + 条件分岐フィールド対応
   ※ このブロックをまるごと、子テーマ style.css の末尾に追記してください
   ========================================================= */

.wpcf7 {
  background: #f7f7f7 !important;
  padding: 35px !important;
  box-sizing: border-box !important;
}

.wpcf7 .hidden-fields-container {
  display: none !important;
}

/* ▼ 修正点：">"（直下指定）を外し、
   Conditional Fieldsのグループ内(div)にあるpタグにも効くようにしています */
.wpcf7 form p {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  padding: 20px 16px !important;
  margin: 0 !important;
  border-bottom: 1px solid #e5e5e5 !important;
  box-sizing: border-box !important;
}

.wpcf7 form p:first-of-type {
  border-top: none !important;
}

/* ▼ 修正点：印刷ボタン・送信ボタンを縦並びにし、行間に余白を追加 */
.wpcf7 form p:has(input[type="submit"]) {
  border-bottom: none !important;
  padding-top: 16px !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  text-align: center !important;
}

.wpcf7 p label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 200px !important;
  flex-shrink: 0 !important;
  font-size: 15px !important;
  font-weight: bold !important;
  color: #222 !important;
  padding-right: 16px !important;
}

.wpcf7 .required {
  display: inline-block !important;
  margin-left: 8px !important;
  padding: 4px 10px !important;
  background: #161c21 !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: normal !important;
  border-radius: 2px !important;
}

.wpcf7 .wpcf7-form-control-wrap {
  display: block !important;
  flex: 1 !important;
  min-width: 240px !important;
  box-sizing: border-box !important;
}

.wpcf7 .wpcf7-form-control-wrap:has(.wpcf7-list-item) {
  display: flex !important;
  flex-wrap: wrap !important;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
  display: block !important;
  width: 100% !important;
  padding: 10px 12px !important;
  font-size: 14px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

.wpcf7 textarea {
  height: 120px !important;
}

.wpcf7 select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  padding: 10px 40px 10px 12px !important;
  font-size: 14px !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23333'%3E%3Cpath d='M5.25 7.5L10 12.25L14.75 7.5H5.25Z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  box-sizing: border-box !important;
}

.wpcf7 select::-ms-expand {
  display: none !important;
}

.wpcf7 .wpcf7-list-item {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  margin: 4px 24px 8px 0 !important;
}

.wpcf7 .wpcf7-list-item label {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: normal !important;
  color: #222 !important;
}

.wpcf7 .wpcf7-list-item input[type="radio"],
.wpcf7 .wpcf7-list-item input[type="checkbox"] {
  margin: 0 6px 0 0 !important;
  width: auto !important;
  accent-color: #161c21 !important;
}

.wpcf7 input[type="submit"] {
  display: block !important;
  width: 200px !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #161c21 !important;
  color: #fff !important;
  font-size: 16px !important;
  border: 0 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

.wpcf7 input[type="submit"]:hover {
  background: #333c44 !important;
}

/* ▼ 追加：印刷ボタン（送信ボタンとは役割が違うと分かるよう、反転配色に） */
.wpcf7 input.cf7-print-btn {
  display: block !important;
  width: 200px !important;
  height: 50px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  color: #161c21 !important;
  font-size: 16px !important;
  font-weight: bold !important;
  border: 2px solid #161c21 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}

.wpcf7 input.cf7-print-btn:hover {
  background: #161c21 !important;
  color: #fff !important;
}

.wpcf7 .wpcf7-spinner {
  display: none !important;
}

.wpcf7-form.submitting .wpcf7-spinner {
  display: inline-block !important;
  margin-left: 8px !important;
}

.wpcf7 form p.cf7-note {
  display: block !important;
  text-align: center !important;
  font-size: 13px !important;
  color: #666 !important;
  padding: 8px 16px 0 !important;
  border-bottom: none !important;
}

.wpcf7 form p.cf7-note a {
  color: #161c21 !important;
  text-decoration: underline !important;
}

/* ▼ 追加：Conditional Fieldsで表示されたグループに軽くハイライトをつける */
.wpcf7 [data-class="wpcf7cf_group"] {
  display: block !important;
  border-left: 3px solid #161c21 !important;
  background: #eef1f3 !important;
  margin: 4px 0 !important;
  border-radius: 0 4px 4px 0 !important;
}

/* ▼ 追加：非表示中のグループを確実に隠す（保険） */
.wpcf7 .wpcf7cf-hidden {
  display: none !important;
}

@media screen and (max-width: 600px) {
  .wpcf7 {
    padding: 20px !important;
  }

  .wpcf7 form p {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px 8px !important;
  }

  .wpcf7 form p:has(input[type="submit"]) {
    padding-top: 16px !important;
    align-items: center !important;
  }

  .wpcf7 p label {
    display: block !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 4px 0 !important;
    line-height: 1.4 !important;
  }

  .wpcf7 .required {
    padding: 4px 10px !important;
    margin-left: 8px !important;
  }

  .wpcf7 .wpcf7-form-control-wrap {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .wpcf7 .wpcf7-list-item {
    font-size: 14px !important;
  }

  .wpcf7 input[type="submit"],
  .wpcf7 input.cf7-print-btn {
    width: 100% !important;
  }
}

/* 画面では常に非表示 */
.wpcf7 form p.print-only {
  display: none !important;
}


/* =========================================================
   印刷用レイアウト（A4／送信前の内容確認用）
   ========================================================= */
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }

  header, footer, nav,
  #sidebar,
  #sp_menu,
  #fix_header,
  #fix_bottom_menu,
  #wp-admin-bar-root-default,
  .c-infoBar,
  #pickup_banner,
  #breadcrumb,
  .c-pageTitle,
  .no-print {
    display: none !important;
  }

  .is-style-crease::before,
  .is-style-crease::after {
    display: none !important;
    box-shadow: none !important;
  }

  /* ▼ 追加：印刷時、フォームより上の余白をすべて詰める */
  #main_content,
  .l-mainContent__inner,
  .l-content,
  .l-container,
  .print-target {
    margin: 0 !important;
    padding: 0 !important;
  }

  .is-style-crease {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .cf7-print-btn,
  .wpcf7-submit,
  .grecaptcha-badge {
    display: none !important;
  }

  .wpcf7-form {
    max-width: 100%;
    font-size: 12pt;
    line-height: 1.8;
    color: #000;
  }

  .wpcf7 [data-class="wpcf7cf_group"] {
    background: none !important;
    border-left: none !important;
  }
	
  /* 印刷ボタン・送信ボタンの行を、余白ごと非表示 */
  #cf7-print-actions {
    display: none !important;
  }
	
  /* 承認チェックボックスの行を、まるごと非表示（詳細度を上げて確実に上書き） */
  .wpcf7 form .wpcf7-form-control-wrap[data-name="acceptance-80"] {
    display: none !important;
  }
	
/* ▼ 追加：印刷時は余白・文字を詰めて1枚に収まりやすくする */
  @page {
    margin: 10mm; /* 15mmから縮小 */
  }

  .wpcf7 {
    padding: 10px !important;
  }

  .wpcf7 form p {
    padding: 5px 8px !important;
  }

  .wpcf7 p label {
    font-size: 12pt !important;
  }

  .wpcf7 input[type="text"],
  .wpcf7 input[type="email"],
  .wpcf7 input[type="tel"],
  .wpcf7 select,
  .wpcf7 textarea {
    padding: 5px 8px !important;
    font-size: 12pt !important;
  }

  .wpcf7 textarea {
    height: 50px !important;
  }

  .wpcf7-list-item {
    margin: 2px 16px 2px 0 !important;
  }

  .wpcf7 [data-class="wpcf7cf_group"] {
    margin: 0 !important;
    padding: 0 !important;
  }

  .wpcf7-form {
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }
	  /* 印刷時だけ表示し、余白を広めにとってサインしやすくする */
  .wpcf7 form p.print-only {
    display: block !important;
    margin-top: 40px !important;
    padding-top: 20px !important;
    border-top: 1px solid #999 !important;
    font-size: 12pt !important;
  }
}