/* ==========================================================================
 * 生け花注文フォーム (Contact Form 7)
 *
 * スコープ: .seika-cf7 (CF7 フォームの最上位に置くラッパ div)
 *   - グローバル style.css の label/input スタイル (flex space-between 等) を
 *     このスコープ内でだけ上書きする。
 *   - 画像リファレンスに準拠:
 *     * ラベルは固定170px 左列 + 入力右列 の grid
 *     * 【...】セクション見出し, 罫線なし
 *     * ※注記は枠なし・細グレー
 *     * お札+備考欄 3カラム(背景色なし)
 *     * 「ご注文者様と同じ」はタウプ色ボタン(ラベル下)
 *     * 送信ボタンはタウプ色・中央
 * ==========================================================================
 */

.seika-cf7 {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 30px 40px;
    color: #333;
    font-family: inherit; /* ryo-text-plusn, serif */
    font-size: 15px;
    line-height: 1.7;
}

/* ── フィールドセット / セクション見出し ─────────── */
.seika-cf7 .seika-section {
    border: 0;
    padding: 0;
    margin: 0 0 28px;
    min-width: 0;
}

/* セクション見出し装飾: 左ラインアクセント */
.seika-cf7 .seika-section > legend {
    display: block;
    padding: 2px 0 2px 14px;
    margin: 0 0 16px;
    border: 0;
    border-left: 4px solid rgb(103,87,61);
    font-size: 1.05em;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.4;
    float: none;
    width: 100%;
}

.seika-cf7 .seika-inline-note {
    font-size: 0.85em;
    font-weight: normal;
    color: rgb(119,119,119);
    margin-left: 6px;
}

.seika-cf7 .seika-opt {
    color: rgb(119,119,119);
    font-size: 0.85em;
    margin-left: 4px;
    font-weight: normal;
}

/* ── 基本レイアウト: <label>ラベル [field]</label> ─────
 * グローバル label { flex; space-between } を grid で上書き。
 */
.seika-cf7 label {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 8px 20px;
    align-items: center;
    padding: 0;
    margin: 0 0 12px;
    width: 100%;
    max-width: 100%;
    font-weight: normal;
    justify-content: start;
}

.seika-cf7 label > .wpcf7-form-control-wrap {
    display: block; /* 既定の inline + baseline によって textarea 下に余白が出るのを防ぐ */
    width: 100%;
    max-width: 720px;
}

.seika-cf7 input[type="text"],
.seika-cf7 input[type="tel"],
.seika-cf7 input[type="email"],
.seika-cf7 input[type="date"],
.seika-cf7 textarea {
    display: block; /* wrap span 内のベースライン余白を消す */
    width: 100%;
    padding: 6px 10px;
    border: 1px solid rgb(162,151,133);
    border-radius: 0;
    background: #fff;
    font: inherit;
    line-height: 1.6;
    box-sizing: border-box;
    vertical-align: top;
}

.seika-cf7 input[type="date"] {
    max-width: 260px;
}

.seika-cf7 input[readonly] {
    background: #f5f5f5;
    color: rgb(119,119,119);
}

.seika-cf7 input:focus,
.seika-cf7 textarea:focus {
    outline: none;
    border-color: rgb(103,87,61);
}

/* ── 注記 (※) インライン行 ─────────────
 * ラベル列 170px + gap 20px = 190px ぶんインデントして入力列と揃える。
 */
.seika-cf7 .seika-note {
    margin: -4px 0 14px;
    padding: 0 0 0 190px;
    background: none;
    border: 0;
    color: rgb(119,119,119);
    font-size: 0.9em;
}

/* セクション末尾の※注記(=送り先住所の※)は次のブロックとの余白を確保 */
.seika-cf7 .seika-section > .seika-note:last-child {
    margin-bottom: 28px;
}

/* 上部（フォーム直下）の注記: 導入文と行頭を揃え、フォントも小さく */
.seika-cf7 > .seika-note,
.seika-cf7 > .seika-note-intro {
    padding-left: 1.2em;
    text-indent: -1.2em;
    margin: 0 0 2px;
    line-height: 1.5;
    font-size: 0.82em;
}

/* 注記ブロック最後の行: 次セクションとの間隔 */
.seika-cf7 > .seika-note-intro:last-of-type {
    margin-bottom: 30px;
}

/* TEL リンク: SP のみタップで発信、PC では通常テキスト扱い */
.seika-cf7 .seika-tel-link {
    color: inherit;
    text-decoration: none;
}
@media screen and (min-width: 993px) {
    .seika-cf7 .seika-tel-link {
        pointer-events: none;
        cursor: inherit;
    }
}

/* ── 通夜欄 (2段レイアウト) ─────────────
 * 1段目: 説明文「通夜なし(一日葬)の場合は ✓ を入れてください □」
 * 2段目: 日付入力
 */
.seika-cf7 .seika-row-wake {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 8px 20px;
    align-items: start;
    margin: 0 0 12px;
}

.seika-cf7 .seika-row-wake-label {
    padding-top: 6px;
}

.seika-cf7 .seika-wake-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    padding-top: 6px;
    color: rgb(119,119,119);
    font-size: 0.95em;
}

.seika-cf7 .seika-check-icon {
    display: inline-block;
    color: #6b8a5b;
    padding: 0 2px;
}

.seika-cf7 .seika-wake-hint input[type="checkbox"] {
    margin: 0 0 0 4px;
    width: 16px;
    height: 16px;
}

.seika-cf7 .seika-row-wake-date .wpcf7-form-control-wrap {
    width: 100%;
    max-width: 260px;
    display: inline-block;
}

/* ── お札のご名義 + 備考欄 3カラム ─────────── */
.seika-cf7 .seika-nameplate-block {
    display: grid;
    grid-template-columns: 170px auto 1fr;
    gap: 16px 24px;
    align-items: start;
    padding: 0;
    margin: 20px 0 32px;
    background: none;
    /* 他の行の右端 (170 + 20 + 720 = 910px) と揃える */
    max-width: 910px;
}

.seika-cf7 .seika-nameplate-col-label {
    padding: 2px 0 2px 12px;
    margin-top: 6px;
    border-left: 4px solid rgb(103,87,61);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.4;
    white-space: nowrap;
}

.seika-cf7 .seika-nameplate-col-input .wpcf7-form-control-wrap {
    width: auto;
}

.seika-cf7 textarea.seika-nameplate {
    writing-mode: vertical-rl;
    -ms-writing-mode: tb-rl;
    text-orientation: mixed;
    /* Safari は vertical-rl + HTML cols/rows の intrinsic サイズを
     * 物理 width/height より優先する。論理プロパティで明示し、
     * -webkit-appearance も切って既定 textarea 描画をリセット */
    height: 336px;
    width: 200px;
    inline-size: 336px;
    block-size: 200px;
    min-inline-size: 336px;
    min-block-size: 200px;
    max-width: 100%;
    padding: 14px 12px;
    background: #fff;
    border: 1px solid rgb(162,151,133);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.9;
    letter-spacing: 0.08em;
    resize: none;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
}

.seika-cf7 .seika-nameplate-col-notes {
    min-width: 0;
    padding-top: 8px;
}

.seika-cf7 .seika-note-line {
    margin: 0 0 4px;
    padding-left: 1em;
    text-indent: -1em;
    color: #333;
    line-height: 1.85;
    font-size: 0.95em;
}

.seika-cf7 .seika-remarks-inline {
    margin-top: 20px;
}

.seika-cf7 .seika-remarks-label {
    padding: 2px 0 2px 12px;
    margin: 0 0 10px;
    border-left: 4px solid rgb(103,87,61);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

.seika-cf7 .seika-remarks-inline .wpcf7-form-control-wrap {
    width: 100%;
}

.seika-cf7 .seika-remarks-inline textarea {
    width: 100%;
    min-height: 110px;
    padding: 10px;
    border: 1px solid rgb(162,151,133);
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
}

/* ── ご請求先: 「ご注文者様と同じ」ボタン付き行 ───── */
.seika-cf7 .seika-row-stack {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 6px 20px;
    align-items: start;
    margin: 0 0 16px;
}

.seika-cf7 .seika-row-stack-label {
    padding-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.seika-cf7 .seika-row-stack-input {
    padding-top: 6px;
}

.seika-cf7 .seika-row-stack-input .wpcf7-form-control-wrap {
    width: 100%;
    max-width: 720px;
    display: block;
}

.seika-cf7 .seika-row-stack-input > .seika-inline-note {
    display: block;
    margin: 0 0 6px;
    color: rgb(119,119,119);
    font-size: 0.9em;
    font-weight: normal;
}

.seika-cf7 .seika-same-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 3px 14px;
    background: rgb(162,151,133);
    color: rgb(239,239,239);
    font-size: 0.8em;
    letter-spacing: 0.05em;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    font-weight: normal;
    width: auto;
    max-width: fit-content;
    position: relative;
}

.seika-cf7 .seika-same-btn.is-on {
    background: rgb(103,87,61);
}

.seika-cf7 .seika-same-btn input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* ── 送信ボタン (ボタン＋スピナーを中央寄せ flex でまとめる) ─────────── */
.seika-cf7 .seika-submit-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 34px 0 10px;
}

.seika-cf7 .wpcf7-submit {
    display: block;
    width: 300px;
    max-width: 80%;
    margin: 0; /* 中央寄せは .seika-submit-wrap の flex が担当 */
    padding: 10px 20px;
    background: rgb(162,151,133);
    color: rgb(239,239,239);
    border: 0;
    border-radius: 3px;
    font-size: 1em;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.5;
}

.seika-cf7 .wpcf7-submit:hover {
    background: rgb(103,87,61);
}

.seika-cf7 .wpcf7-submit:disabled {
    background: #999;
    cursor: not-allowed;
}

/* スピナー: 待機時は場所を取らずボタンを完全中央に保ち、送信中のみボタン右に表示 */
.seika-cf7 .wpcf7-spinner {
    display: none;
    margin: 0; /* CF7 既定の左右マージンを打ち消し、間隔は .seika-submit-wrap の gap で制御 */
    flex: 0 0 auto;
}

.wpcf7-form.submitting .seika-cf7 .wpcf7-spinner {
    display: inline-block;
    visibility: visible;
}

/* ── ハニーポット ─────── */
.seika-cf7 .seika-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── CF7 バリデーションメッセージ ── */
.seika-cf7 .wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    color: #c84b4b;
    font-size: 0.85em;
}

/* 存在しない郵便番号の警告・入力形式エラー (JS で表示制御) */
.seika-cf7 .seika-zip-error,
.seika-cf7 .seika-live-error {
    display: block;
    margin-top: 4px;
    color: #c84b4b;
    font-size: 0.85em;
}

.seika-cf7 .wpcf7-response-output {
    max-width: 720px;
    margin: 20px auto !important;
    padding: 12px 16px !important;
    border-radius: 3px;
    font-size: 0.95em;
}

/* ── SP (992px以下) 縦積み ─────────── */
@media screen and (max-width: 992px) {
    .seika-cf7 {
        padding: 14px 14px 30px;
    }

    .seika-cf7 label {
        display: block;
    }
    .seika-cf7 label > .wpcf7-form-control-wrap {
        max-width: 100%;
    }

    .seika-cf7 .seika-note {
        padding-left: 0;
    }

    .seika-cf7 .seika-row-wake {
        display: block;
    }
    .seika-cf7 .seika-row-wake-label,
    .seika-cf7 .seika-row-wake-content {
        display: block;
        width: 100%;
        padding-top: 0;
    }
    .seika-cf7 .seika-row-wake-label {
        margin-bottom: 8px;
    }
    .seika-cf7 .seika-wake-hint {
        display:inline;
        padding-top: 0;
        margin: 0 0 10px;
    }
    .seika-cf7 .seika-row-wake-date .wpcf7-form-control-wrap {
        max-width: 100%;
    }

    .seika-cf7 .seika-nameplate-block {
        display: block;
    }
    .seika-cf7 .seika-nameplate-col-label {
        padding-top: 0;
        margin-bottom: 10px;
    }
    .seika-cf7 .seika-nameplate-col-input {
        margin-bottom: 18px;
        display: flex;
        justify-content: center;
    }

    .seika-cf7 .seika-row-stack {
        display: block;
    }
    .seika-cf7 .seika-row-stack-label {
        padding-top: 0;
        margin-bottom: 6px;
    }
    .seika-cf7 .seika-row-stack-input {
        padding-top: 0;
    }
}
