@charset "utf-8";

/*
 * form.css — サクラコモンズ メールフォームスキン専用CSS
 * style.css を前提として読み込まれる。フォーム固有のスタイルのみ定義。
 *
 * カラー変数（style.css の仕様に準拠）
 * アクセント：#b72661
 * ボタン    ：#e8b368
 * テキスト  ：#222222
 * サブ文字  ：#707070
 * エラー    ：#c0392b
 * 背景（薄）：#fff5f7
 */

/* ----------------------------------------------------------
    リセット補足（style.css から継承しない要素のみ）
------------------------------------------------------------- */
fieldset, legend { border: 0; }
input, textarea, select {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    box-sizing: border-box;
}
input, button { line-height: normal; vertical-align: middle; }
label { cursor: pointer; }
/* style.css が未読み込みの場合の保険（ヒーロー画像の崩れ防止） */  /* 追加：28行目 */
figure { margin: 0; padding: 0; }                                    /* 追加：29行目 */
img { display: block; max-width: 100%; height: auto; }               /* 追加：30行目 */

/* ----------------------------------------------------------
    ヒーロー画像（entry-img）の高さ修正
    ・figure に height: 400px + overflow: hidden を指定して画像を正確にクロップ
    ・figure の margin（body の #eeeeee グレーが見える）を避けるため、
      コンテンツとの間隔は白背景の .entry 側の padding-top で管理する
------------------------------------------------------------- */
.entry-img {                                                                 /* 修正：38行目 */
    overflow: hidden;                                                        /* 修正：39行目 */
    height: 400px;              /* figure の高さを固定してグレー漏れを防ぐ */ /* 修正：40行目 */
}                                                                            /* 修正：41行目 */
.entry-img img {                                                             /* 修正：42行目 */
    width: 100%;                                                             /* 修正：43行目 */
    height: 100%;               /* figure の 400px をそのまま継承          */ /* 修正：44行目 */
    object-fit: cover;                                                       /* 修正：45行目 */
    object-position: center;                                                 /* 修正：46行目 */
    display: block;                                                          /* 修正：47行目 */
    margin-bottom: 0;           /* style.css の calc 値を 0 に上書き       */ /* 修正：48行目 */
}                                                                            /* 修正：49行目 */
.entry {                                                                     /* 追加：50行目 */
    padding-top: clamp(60px, 6.5vw, 80px); /* 白背景内で画像との間隔を確保 */ /* 追加：51行目 */
}                                                                            /* 追加：52行目 */

/* ----------------------------------------------------------
    ステップインジケーター
    （入力→確認→完了 の進捗を表示）
------------------------------------------------------------- */
.form-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 2em 0 2.4em;
    flex-wrap: wrap;
}

/* 各ステップ */
.form-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 64px;
}

/* ステップ番号バッジ */
.form-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #cccccc;
    background-color: #ffffff;
    color: #aaaaaa;
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* ステップラベル */
.form-step-label {
    font-size: 12px;
    color: #aaaaaa;
    font-family: "Montserrat", sans-serif;
    letter-spacing: 0.04em;
    transition: color 0.2s;
}

/* 現在のステップ（アクティブ） */
.form-step.is-active .form-step-num {
    background-color: #b72661;
    border-color: #b72661;
    color: #ffffff;
}
.form-step.is-active .form-step-label {
    color: #b72661;
    font-weight: bold;
}

/* 完了済みステップ */
.form-step.is-done .form-step-num {
    background-color: #f9e8ef;
    border-color: #b72661;
    color: #b72661;
}
.form-step.is-done .form-step-label {
    color: #b72661;
}

/* 矢印 */
.form-step-arrow {
    color: #cccccc;
    font-size: 13px;
    flex-shrink: 0;
    padding-bottom: 18px; /* ラベル分を補正して縦中央に寄せる */
}

/* ----------------------------------------------------------
    リード文・注釈
------------------------------------------------------------- */
.form-lead {
    margin: 0 0 1.6em;
    font-size: clamp(13px, 1.8vw, 15px);
    color: #555555;
    line-height: 1.8;
}

.form-required-note {
    display: inline-block;
    margin-top: 0.4em;
    font-size: 12px;
    color: #c0392b;
}

.form-required-note .fas {
    font-size: 9px;
    vertical-align: super;
    margin-right: 2px;
}

/* ----------------------------------------------------------
    エラー出力エリア
------------------------------------------------------------- */
.form-error-box:not(:empty) {
    margin-bottom: 1.6em;
    padding: 16px 20px;
    background-color: #fdf3f3;
    border-left: 4px solid #c0392b;
    border-radius: 4px;
    color: #c0392b;
    font-size: 14px;
    line-height: 1.7;
}

/* CGI が出力するエラー文言 */
.form-error-box ul {
    list-style: disc;
    padding-left: 1.4em;
}

/* ----------------------------------------------------------
    フォームテーブル（{$form_data} のラッパー）
    CGI が <tr><th>...</th><td>...</td></tr> を出力する
------------------------------------------------------------- */
.table {
    width: 100%;
    border-collapse: collapse;
    border-top: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    margin-bottom: 0;
}

.table th {
    width: 30%;
    padding: 16px 18px;
    background-color: #f9e8ef;       /* 優しいピンク（入力・確認・完了 全画面共通） */
    color: #b72661;
    border-right: 1px solid #e8c8d8;
    border-bottom: 1px solid #e8c8d8;
    font-weight: 600;
    font-size: 13px;
    vertical-align: top;
    line-height: 1.5;
    white-space: nowrap;
}

.table td {
    padding: 16px 18px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    color: #222222;
    font-size: 14px;
    vertical-align: top;
    line-height: 1.6;
}


/* ----------------------------------------------------------
    入力フィールド（CGI が <input> / <textarea> / <select> を出力）
------------------------------------------------------------- */
.table input[type="text"],
.table input[type="email"],
.table input[type="tel"],
.table textarea,
.table select {
    width: 100%;
    max-width: 480px;
    padding: 9px 12px;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 14px;
    color: #222222;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

.table input[type="text"]:focus,
.table input[type="email"]:focus,
.table input[type="tel"]:focus,
.table textarea:focus,
.table select:focus {
    outline: none;
    border-color: #b72661;           /* ★ アクセントカラー（旧: #209dd9） */
    box-shadow: 0 0 0 3px rgba(183, 38, 97, 0.12);
}

.table textarea {
    max-width: 100%;
    min-height: 120px;
    resize: vertical;
    vertical-align: top;
}

/* 郵便番号入力枠の幅調整（入力中に数字が隠れないよう2倍に拡張） */
.table input[name*="zip"],
.table input[name*="yubin"],
.table input.zip,
.table input.yubin {
    width: 320px !important;
}

/* 必須マーク（CGI が .required クラスを付与する場合） */
.required::after,
span.required {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    background-color: #c0392b;
    color: #ffffff;
    font-size: 11px;
    border-radius: 3px;
    vertical-align: middle;
    content: "必須";
}

/* チェックボックス・ラジオ */
.table input[type="checkbox"],
.table input[type="radio"] {
    margin-right: 6px;
    accent-color: #b72661;
}

/* ----------------------------------------------------------
    ボタンエリア
------------------------------------------------------------- */
.form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 2em;
    padding: 2em 0;
}

.form-actions--confirm {
    flex-direction: column-reverse; /* 「戻る」を下に配置 */
}

@media (min-width: 540px) {
    .form-actions {
        flex-direction: row;
        justify-content: center;
    }
    .form-actions--confirm {
        flex-direction: row-reverse;
    }
}

/* 送信ボタン */
.btn-form-submit {
    display: inline-block;
    padding: 14px 52px;
    background-color: #b72661;       /* ★ アクセントカラー */
    color: #ffffff;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: background-color 0.2s, transform 0.15s;
    min-height: 50px;
}

.btn-form-submit:hover {
    background-color: #9e1f54;
    transform: translateY(-1px);
}

.btn-form-submit:active {
    transform: translateY(0);
}

/* 戻るボタン */
.btn-form-back {
    display: inline-block;
    padding: 13px 36px;
    background-color: transparent;
    color: #707070;
    font-size: clamp(13px, 1.8vw, 15px);
    border: 2px solid #cccccc;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    min-height: 50px;
}

.btn-form-back:hover {
    border-color: #b72661;
    color: #b72661;
}

/* ----------------------------------------------------------
    サイトへ戻るリンク
------------------------------------------------------------- */
.form-back-link {
    text-align: center;
    padding: 1em 0 2em;
}

/* ----------------------------------------------------------
    完了画面（thanks.html 専用）
------------------------------------------------------------- */
.form-complete {
    margin: 2.4em 0 3em;
    padding: clamp(32px, 5vw, 56px) clamp(20px, 5vw, 48px);
    background-color: #ffffff;
    border: 1px solid #eddde6;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 16px rgba(183, 38, 97, 0.06);
}

/* チェックアイコン */
.form-complete-icon {
    font-size: 56px;
    color: #b72661;
    margin-bottom: 0.6em;
    line-height: 1;
}

/* 完了タイトル */
.form-complete-title {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    color: #222222;
    margin-bottom: 1em;
}

/* 本文 */
.form-complete-body {
    font-size: clamp(14px, 2vw, 16px);
    color: #555555;
    line-height: 2;
    margin-bottom: 1.2em;
}

/* 注記 */
.form-complete-note {
    font-size: 13px;
    color: #888888;
    line-height: 1.7;
    margin-bottom: 2em;
}

/* ボタンラッパー：flexboxで中央寄せ */
.form-complete-action {
    margin-top: 2em;
    display: flex;
    justify-content: center;
}

/* btn / btn-accent は style.css から継承 */

/* ----------------------------------------------------------
    モバイル対応（767px 以下）
------------------------------------------------------------- */
@media (max-width: 767px) {

    /* ステップ番号バッジを少し小さく */
    .form-step-num {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }
    .form-step-label {
        font-size: 11px;
    }
    .form-steps {
        gap: 8px;
    }
    .form-step-arrow {
        font-size: 11px;
    }

    /* テーブルをブロック表示に切替（縦積み） */
    .table,
    .table tbody,
    .table tr,
    .table th,
    .table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .table th {
        border-right: none;
        border-bottom: 1px solid #9e1f54;
        white-space: normal;
    }

    .table td {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .table input[type="text"],
    .table input[type="email"],
    .table input[type="tel"],
    .table textarea,
    .table select {
        max-width: 100%;
    }
}