@charset "UTF-8";
/* ============================================================
   ヤトミ製材 お問い合わせフォーム（Contact Form 7 用）
   元HTMLのフォーム部分のCSSを、CF7が出力するマークアップに合わせて移植。
   すべて .ytm-form の中に閉じているので、テーマの他の部分には影響しません。
   ============================================================ */

.ytm-form{
  --ink:#16201e;
  --ink-2:#3a4744;
  --muted:#6b7a76;
  --line:#c9cec8;
  --line-soft:#dcdfd9;
  --paper:#e9ebe6;
  --card:#ffffff;
  --water:#2f6b63;
  --water-dk:#1f4c46;
  --water-tint:#e3ece9;
  --heart:#8a5a24;
  --err:#9c3a2c;
  --r:3px;

  color:var(--ink);
  font-size:15px;line-height:1.85;font-feature-settings:"palt" 1;text-align:left;
}
.ytm-form,.ytm-form *,.ytm-form *::before,.ytm-form *::after{box-sizing:border-box}
.ytm-form a{color:var(--water-dk)}
.ytm-form :focus-visible{outline:2px solid var(--water);outline-offset:2px}
/* スマホでは左右の枠を消して端まで広げる。-18px はテーマ側の左右余白に合わせて調整 */
@media(max-width:560px){
  .ytm-form{padding:24px 18px 22px;border-left:0;border-right:0;border-radius:0;margin:0 -18px}
}

/* ── 見出し・補足 ── */
.ytm-form fieldset{border:0;margin:0 0 50px;padding:0;min-width:0}
.ytm-form legend,.ytm-form .flabel{display:block;font-size:18px;font-weight:700;margin:0 0 10px;padding:0;color:var(--ink);line-height:1.85}
.ytm-form .grid2 .flabel{font-size: 14.5px}
.ytm-form legend label{font:inherit;color:inherit;margin:0}
.ytm-form .flabel.sub{font-weight:500;font-size:13.5px}
.ytm-form .hint{font-size:12.5px;color:var(--muted);line-height:1.7;margin:0 0 12px}
.ytm-form .req{color:var(--heart);font-size:11.5px;font-weight:500;margin-left:7px;letter-spacing:.04em}
.ytm-form .opt{color:var(--muted);font-size:11.5px;font-weight:400;margin-left:7px}

/* ── CF7の既定スタイルを打ち消す ── */
.ytm-form .wpcf7-form-control-wrap{display:block;position:relative}
.ytm-form .wpcf7-list-item{display:block;margin:0}

/* ── 選択カード（ラジオ） ── */
.ytm-form .choices{display:grid;gap:8px}
.ytm-form .choices.c2{grid-template-columns:1fr 1fr}
@media(max-width:560px){.ytm-form .choices.c2{grid-template-columns:1fr}}
.ytm-form .choices label{position:relative;display:block;margin:0}
.ytm-form .choices input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}
.ytm-form .choices .wpcf7-list-item-label{display:block;border:1px solid var(--line);border-radius:var(--r);padding:11px 14px;
  font-size:14px;line-height:1.6;color:var(--ink-2);background:var(--card)}
.ytm-form .choices input:hover+.wpcf7-list-item-label{border-color:var(--water);color:var(--ink)}
.ytm-form .choices input:focus-visible+.wpcf7-list-item-label{outline:2px solid var(--water);outline-offset:2px}
.ytm-form .choices input:checked+.wpcf7-list-item-label{border-color:var(--water-dk);background:var(--water-tint);color:var(--water-dk);
  box-shadow:inset 3px 0 0 var(--water-dk);font-weight:500}

/* ── 入力欄 ── */
.ytm-form .grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}
@media(max-width:560px){.ytm-form .grid2{grid-template-columns:1fr}}
.ytm-form .f{margin-bottom:20px}
.ytm-form input[type=text],.ytm-form input[type=email],.ytm-form input[type=tel],.ytm-form input[type=number],
.ytm-form select,.ytm-form textarea{
  display:block;width:100%;max-width:100%;height:auto;margin:0;
  font:inherit;font-size:15px;line-height:1.6;color:var(--ink);background-color:#fcfdfc;
  border:1px solid var(--line);border-radius:var(--r);padding:10px 12px;appearance:none;box-shadow:none}
.ytm-form input:focus,.ytm-form select:focus,.ytm-form textarea:focus{
  border-color:var(--water);background-color:#fff;outline:none;box-shadow:0 0 0 3px rgba(47,107,99,.14)}
.ytm-form textarea{min-height:148px;resize:vertical;line-height:1.8}
.ytm-form select{background-image:linear-gradient(45deg,transparent 50%,var(--ink-2) 50%),linear-gradient(135deg,var(--ink-2) 50%,transparent 50%);
  background-position:calc(100% - 18px) 19px,calc(100% - 13px) 19px;background-size:5px 5px;background-repeat:no-repeat;padding-right:38px}

/* エラー表示（CF7が付けるクラス） */
.ytm-form input.wpcf7-not-valid,.ytm-form textarea.wpcf7-not-valid,.ytm-form select.wpcf7-not-valid{
  border-color:var(--err);background-color:#fdf7f6}
.ytm-form .wpcf7-not-valid-tip{display:block;font-size:12.5px;color:var(--err);margin-top:5px;line-height:1.6}

/* ── 寸法 ── */
.ytm-form .dims{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:9px}
.ytm-form .dims label{display:block;font-size:12px;font-weight:400;color:var(--muted);margin:0 0 3px}
.ytm-form .dims input{font-variant-numeric:tabular-nums}
.ytm-form .dims.off{opacity:.4;pointer-events:none}
.ytm-form .undecided label{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--ink-2);cursor:pointer;margin:0}
.ytm-form .undecided input{width:16px;height:16px;margin:0;accent-color:var(--water-dk);flex:none}

/* ── 添付（ドロップゾーン） ── */
.ytm-form .drop{position:relative;display:block;margin:0;border:1px dashed var(--line);border-radius:var(--r);background:#fcfdfc;
  padding:22px 18px;text-align:center;cursor:pointer}
.ytm-form .drop:hover,.ytm-form .drop.over{border-color:var(--water);background:var(--water-tint)}
.ytm-form .drop:focus-within{outline:2px solid var(--water);outline-offset:2px}
.ytm-form .drop .picker{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.ytm-form .drop b{display:block;font-size:14px;font-weight:500;color:var(--water-dk);margin-bottom:3px}
.ytm-form .drop small{color:var(--muted);font-size:12.5px}
.ytm-form .files{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:6px}
.ytm-form .files:empty{display:none}
.ytm-form .files li{display:flex;align-items:center;gap:10px;font-size:13px;background:var(--paper);border-radius:var(--r);padding:7px 10px;margin:0}
.ytm-form .files .nm{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ytm-form .files .sz{color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums;flex:none}
.ytm-form .files button{border:0;background:none;color:var(--muted);cursor:pointer;font:inherit;font-size:12.5px;padding:2px 4px;flex:none}
.ytm-form .files button:hover{color:var(--err);text-decoration:underline}
.ytm-form .ferr{font-size:12.5px;color:var(--err);margin:5px 0 0;line-height:1.6}
.ytm-form .ferr:empty{display:none}
/* 実際に送信される file1〜3 は隠す（サーバ側のエラー文だけ表示） */
.ytm-form .slots input[type=file]{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden;clip:rect(0 0 0 0)}

/* ── 同意・送信 ── */
.ytm-form .consent{margin-bottom:20px}
.ytm-form .consent label{display:flex;gap:10px;align-items:flex-start;font-size:13.5px;color:var(--ink-2);cursor:pointer;line-height:1.7;margin:0}
.ytm-form .consent input{width:17px;height:17px;margin:4px 0 0;accent-color:var(--water-dk);flex:none}
.ytm-form .submit{position:relative}
.ytm-form .wpcf7-submit{display:block;width:100%;height:auto;margin:0;border:0;border-radius:var(--r);background:var(--water-dk);color:#fff;
  font:inherit;font-size:16px;font-weight:700;letter-spacing:.06em;line-height:1.5;padding:16px;cursor:pointer;appearance:none}
.ytm-form .wpcf7-submit:hover{background:#173a35}
.ytm-form .wpcf7-submit:disabled{background:#9aa5a2;cursor:not-allowed}
/* 送信中のくるくるをボタン内の右端に */
.ytm-form .wpcf7-spinner{position:absolute;right:16px;top:50%;margin:-12px 0 0;background-color:rgba(255,255,255,.35)}
.ytm-form .under{text-align:center;font-size:12.5px;color:var(--muted);margin:12px 0 0}

/* CF7の送信結果メッセージ（フォーム枠の外に出る） */
.wpcf7 form:has(.ytm-form) .wpcf7-response-output{margin:16px 0 0;padding:12px 16px;border:1px solid #c9cec8;border-radius:3px;
  font-size:13.5px;line-height:1.7;color:#3a4744;background:#fff}
.wpcf7 form:has(.ytm-form).invalid .wpcf7-response-output,
.wpcf7 form:has(.ytm-form).unaccepted .wpcf7-response-output,
.wpcf7 form:has(.ytm-form).failed .wpcf7-response-output,
.wpcf7 form:has(.ytm-form).spam .wpcf7-response-output{border-color:#9c3a2c;color:#9c3a2c;background:#fdf7f6}
.wpcf7 form:has(.ytm-form).sent .wpcf7-response-output{border-color:#2f6b63;color:#1f4c46;background:#e3ece9}

@media(prefers-reduced-motion:no-preference){
  .ytm-form .choices .wpcf7-list-item-label,.ytm-form .drop,.ytm-form input,.ytm-form textarea,.ytm-form select,.ytm-form .wpcf7-submit{
    transition:border-color .13s,background-color .13s,box-shadow .13s,color .13s}
}
