/* contact.css — お問い合わせフォーム / 完了 / エラー画面 専用スタイル
 *
 * 既存 oniwa.css の視覚言語 (#316745 / #d6e9ca / #f09199 / Sawarabi 系) を踏襲。
 * CSS 変数や utility class は導入せず、既存ファイルと同じ素朴な hex 直書き方式。
 * mobile-first、PC 幅は max-width で頭打ちにする程度。
 */

/* Phase A polish (2026-05-01): /contact/ ページのフッタ背景。
   LP の footer は oniwa.js が月別配色を動的適用するが、/contact/ ページでは
   info_msg 等の element 不在で JS が abort するため bg が未設定 (= 白) になる。
   CSS で明示的に淡緑を当てて LP の視覚言語と統一感を出す。 */
footer {
    background-color: #d6e9ca;
}
/* LP の .fprof は color: #d6e9ca; (淡緑文字、深緑背景前提) だったが、淡緑背景になると
   読めないため濃色に反転。既存 .fprof p の color: #1e1d17 はそのまま自然に乗る。 */
.fprof {
    color: #316745;
}
.footTable {
    color: #316745;
}
footer small {
    color: #316745;
}

/* ================ 共通レイアウト (.contact-page) ================ */
.contact-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 60px;
    font-family: 'Sawarabi Gothic', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'ヒラギノ角ゴ ProN W3', 'メイリオ', Meiryo, sans-serif;
    color: #2e2930;
    line-height: 1.7;
    font-size: 16px;
}
.contact-page p {
    margin: 0.6em 0;
}

/* リード文 */
.contact-lead {
    margin-top: 12px;
}
.contact-anonymous-note {
    color: #43676b;
    font-size: 0.95em;
}

/* 注意ボックス (連絡先未記入時の挙動説明) */
.contact-notice {
    background-color: #fff8df;
    border-left: 5px solid #f0c040;
    padding: 12px 14px;
    margin: 18px 0;
    color: #595857;
    font-size: 0.95em;
    border-radius: 0 6px 6px 0;
}

/* セパレータ + 中見出し */
.contact-divider {
    margin: 28px 0 8px;
    border: 0;
    border-top: 1px solid #d0d0d0;
}
.contact-section-caption {
    text-align: center;
    color: #6c7a89;
    font-size: 0.95em;
    margin: 0 0 14px;
    letter-spacing: 0.04em;
}

/* ================ フォーム要素 ================ */
.contact-form {
    margin-top: 18px;
}
.contact-field {
    display: block;
    margin: 14px 0;
}
.contact-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #316745;
    margin-bottom: 6px;
    font-size: 1.05em;
}

/* 必須 / 任意 chip */
.contact-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.contact-chip-required {
    background-color: #f09199;
    color: #ffffff;
}
.contact-chip-optional {
    background-color: #c9d1d9;
    color: #ffffff;
}

/* input / textarea (素朴に揃える) */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;          /* iOS Safari の zoom-on-focus 抑止 = 16px 以上 */
    font-family: inherit;
    color: #2e2930;
    background: #ffffff;
    border: 1px solid #b8c2cc;
    border-radius: 6px;
    box-sizing: border-box;
    line-height: 1.6;
}
.contact-form textarea {
    resize: vertical;
    min-height: 130px;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid #316745;
    outline-offset: 0;
    border-color: #316745;
}

/* 写真添付エリア */
.contact-file-wrap {
    border: 1px dashed #b8c2cc;
    border-radius: 6px;
    padding: 14px;
    background: #fafafa;
}
.contact-file-wrap input[type="file"] {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    color: #2e2930;
}
.contact-field-hint {
    display: block;
    margin-top: 6px;
    color: #6c7a89;
    font-size: 0.85em;
}

/* Phase A fix-up (2026-05-01): インラインエラー表示 + 選択中ファイルサマリ
   alert() を撤廃して change イベントごとに即フィードバック */
.photos-summary {
    margin: 6px 0 0;
    font-size: 0.9em;
    color: #555555;
    min-height: 1.4em;     /* 表示前後で layout jump させない */
}
.photos-errors {
    margin: 8px 0 0;
    padding: 0;
    display: none;
}
.photos-errors.has-errors {
    display: block;
}
.photos-errors__item {
    background-color: #fdecea;
    border-left: 4px solid #d04040;
    color: #8a1a1a;
    padding: 8px 12px;
    margin: 4px 0;
    font-size: 0.95em;
    border-radius: 0 3px 3px 0;
    line-height: 1.5;
}

/* 送信ボタン */
.contact-submit {
    display: block;
    width: 100%;
    margin: 24px 0 8px;
    padding: 14px 12px;
    background-color: #316745;
    color: #ffffff;
    border: 1px solid #316745;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.18em;
    cursor: pointer;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
    font-family: inherit;
}
.contact-submit:hover {
    background-color: #285738;
    border-color: #285738;
}
.contact-submit:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
/* Phase A fix-up: バリデーションエラー時の disabled 状態 */
.contact-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #6c7a89;
    border-color: #6c7a89;
    box-shadow: none;
    transform: none;
}

/* 送信ボタン下のマイクロコピー */
.contact-submit-foot {
    text-align: center;
    color: #6c7a89;
    font-size: 0.85em;
    margin-top: 4px;
}
.contact-submit-foot a {
    color: #316745;
    text-decoration: underline;
}

/* ================ thanks / error 共通ボタン ================ */
.contact-cta-btn {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 20px auto 8px;
    padding: 12px 16px;
    background-color: #316745;
    color: #ffffff !important;     /* フッタ等の a:link 上書きに勝つ */
    border: 1px solid #316745;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-size: 17px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.contact-cta-btn:hover {
    background-color: #285738;
    text-decoration: none;
}

/* error 画面の文言ボックス */
.contact-error-box {
    background-color: #fff0f0;
    border-left: 5px solid #c0392b;
    padding: 14px 16px;
    margin: 18px 0;
    color: #5a2e2e;
    border-radius: 0 6px 6px 0;
}

/* PC 幅で input 最大幅 */
@media (min-width: 720px) {
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form input[type="tel"] {
        max-width: 520px;
    }
}
