@charset "UTF-8";

/* ========================= 共通コンポーネント ========================= */
/* リアルタイムバリデーションで有効化された送信ボタン */
main:not(#Confirm) .form_submit_btn input[type="submit"].active {
    background-color: var(--main-color);
    color: #fff;
    /* 主要色を元にした柔らかいシャドウ */
    box-shadow: 0 4px 8px color-mix(in srgb, var(--main-color) 20%, transparent);
}

/* 確認/完了画面のプライマリボタン配色 */
main#Confirm .submit__btn,
main#Thanks .input-button,
main#Thanks .input-button a {
    background-color: #536e35;
    color: #fff;
}

/* ホバー時の持ち上がり効果（主要色ベースのシャドウ） */
main#Thanks .input-button:hover {
    box-shadow: 0 4px 8px color-mix(in srgb, var(--main-color) 30%, transparent);
}

/* フォーム入力のフォーカス枠＆ボーダーを主要色に連動 */
.form-control:focus {
    border-color: var(--main-color);
    outline: 3px solid color-mix(in srgb, var(--main-color) 45%, transparent);
    background: #fff;
}

/* ラジオ/チェックのアクセントカラーを主要色に */
.form-radio input[type="radio"],
form input[type="checkbox"] {
    accent-color: var(--main-color);
}

/* フォーム内の“ボタン風リンク”などを主要色に寄せる（必要に応じて使用） */
#form a.button,
#form .link-primary {
    color: var(--main-color);
}

/* ============================ エラーカラー適用 ============================ */
/* エラーメッセージの色を変数化 */
.field-error,
#privacy_error {
    color: var(--error-color) !important;
}

/* エラーボーダーを変数に置換 */
.flx_box03 input.error,
.flx_box03 textarea.error,
textarea#comment.error {
    border: solid 2px var(--error-color) !important;
}


/* フォーム送信ボタンのスタイル - リアルタイムバリデーション対応 */
main:not(#Confirm) .form_submit_btn input[type="submit"] {
    transition: all 0.3s ease;
    cursor: none;
    pointer-events: none;
}

main:not(#Confirm) .form_submit_btn input[type="submit"].active {
    cursor: pointer;
    /* 有効時のポインタ */
    opacity: 1;
    /* 有効時は不透明に */
    pointer-events: auto;
    /* クリック可に戻す */
    background-color: #536e35;
    color: #fff;
    box-shadow: 0 4px 8px color-mix(in srgb, var(--main-color) 20%, transparent);
}

/* フォーム確認画面・送信完了画面 */
main#Confirm {
    max-width: 660px;
    margin: 150px auto !important;
    box-shadow: var(--shadow);
}

main#Confirm #contact,
main#Thanks {
    background-color: #fff;
    padding: 30px 15px;
}

main#Confirm .section__ttl,
main#Thanks .section__ttl {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    text-align: center;
    margin-bottom: 30px;
}

main#Confirm .form__txt,
main#Thanks .form__txt {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5em;
    color: #222;
    text-align: center;
    margin-bottom: 20px;
}

main#Confirm .tbl-form.tbl-r02 {
    margin: 0 auto;
}

main#Confirm .input-button {
    height: 40px;
    font-weight: 700;
    cursor: pointer;
}

main#Confirm .reset__btn {
    background-color: #222;
    color: #fff;
    border: 1px solid #222;
    margin-right: 20px;
    padding-left: 20px;
    padding-right: 20px;
}


main#Confirm #contactForm {
    padding: 10px;
    border: solid 2px #333;
    border-radius: 10px;
}

/* フォーム送信完了画面 */

main#Thanks {
    margin: 150px auto !important;
    box-shadow: var(--shadow);
}

main#Thanks .contact {
    background: #fff;
}

main#Thanks .input-button {
    display: grid;
    place-items: center;
    width: 100%;
    max-width: 300px;
    height: 40px;
    font-weight: 700;
    cursor: pointer;
    margin: 0 auto;
    text-align: center;
    transition: all 0.3s ease-out;
}

main#Thanks .input-button:hover {
    box-shadow: 0 4px 8px rgba(3, 142, 237, 0.2);
}

@media screen and (max-width: 767px) {
    body::before {
        background-image: none;
    }

    main#Confirm,
    main#Thanks {
        margin: 50px auto !important;
        box-shadow: none !important;
    }
}

/* フォームバリデーションエラーメッセージのスタイル */
.field-error {
    color: #dc3545;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    margin-top: -15px;
    margin-bottom: 16px;
    padding-left: 8px;
    display: none;
    word-wrap: break-word;
    max-width: 100%;
    text-align: right;
}

/* チェックボックス用エラーメッセージの特別スタイル */
#privacy_error {
    color: #dc3545 !important;
    font-size: 12px;
    font-weight: 400;
    margin-top: -35px;
    margin-bottom: 20.5px;
    padding-left: 0;
    text-align: center;
}

.field-error:empty {
    display: none;
}

/* エラーがある場合の入力フィールドのスタイル */
.flx_box03 input.error,
.flx_box03 textarea.error {
    border: solid 2px #dc3545 !important;
}

/* 備考欄テキストエリアのエラースタイル強化 */
textarea#comment.error {
    border: solid 2px #dc3545 !important;
}

/* モバイル対応 */
@media screen and (max-width: 767px) {
    .field-error {
        font-size: 11px;
        margin-top: 6px;
        margin-bottom: 12px;
        padding-left: 6px;
    }
}

form input[type="checkbox"] {
    cursor: pointer;
}

.form-row {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 1rem;
}

.badge-required {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.75rem;
    color: white;
    background-color: #e60012;
    padding: 2px 6px;
    border-radius: 4px;
}

.form-control {
    width: 100%;
    max-width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: #f3f3f3;
    border-radius: 4px;
    box-sizing: border-box;
}

.form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5em;
}

.form-radio {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1rem;
    white-space: nowrap;
}

.form-radio input[type="radio"] {
    width: 1.2em;
    height: 1.2em;
    accent-color: #333;
    /* Optional: カスタム色 */
}


.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.form-checkbox label {
    font-weight: bold;
    margin: 0;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-row.form-row--checkbox {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 1rem;
}