/* ============================================================
   style.css - お問い合わせフォーム共通スタイル
   ============================================================ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-size: 14px;
    background-color: var(--base-color, #e3f4fb);
    color: #333;
    line-height: 1.7;
}

/* ─── ページ全体ラッパー ─── */
.page-wrapper {
    max-width: 700px;
    margin: 30px auto;
    padding: 0 15px 40px;
}

/* ─── ヘッダー（ロゴエリア） ─── */
.form-header {
    background-color: #fff;
    border-radius: 8px 8px 0 0;
    border: 1px solid #b8dcee;
    border-bottom: 3px solid var(--theme-color, #1a8fc1);
    padding: 20px 30px;
    text-align: center;
}

.form-header img.product-logo {
    max-height: 70px;
    max-width: 280px;
}

.form-header .product-title {
    color: var(--theme-color, #1a8fc1);
    font-size: 20px;
    font-weight: bold;
}

/* ─── フォームコンテナ ─── */
.form-container {
    background: #fff;
    border: 1px solid #b8dcee;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 30px 35px 35px;
}

/* ─── 冒頭文言 ─── */
.form-intro {
    background: #f0f9ff;
    border-left: 4px solid var(--theme-color, #1a8fc1);
    border-radius: 0 4px 4px 0;
    padding: 12px 16px;
    margin-bottom: 28px;
    font-size: 13px;
    color: #444;
    line-height: 1.8;
}

/* ─── フォームグループ ─── */
.form-group {
    margin-bottom: 22px;
}

.form-group label.field-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    color: #222;
}

.required-mark {
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #aacfdf;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafeff;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--theme-color, #1a8fc1);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 143, 193, 0.1);
}

.form-group textarea {
    height: 130px;
    resize: vertical;
}

.form-group input.error,
.form-group textarea.error {
    border-color: #e53935;
    background: #fff8f8;
}

/* ─── プレースホルダー色 ─── */
::placeholder { color: #bbb; }
::-webkit-input-placeholder { color: #bbb; }
:-ms-input-placeholder { color: #bbb; }

/* ─── 注釈テキスト ─── */
.field-note {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ─── お問い合わせ例 ─── */
.inquiry-example {
    font-size: 12px;
    color: #777;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 6px;
    line-height: 1.8;
}

/* ─── エラーメッセージ ─── */
.error-msg {
    color: #e53935;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.error-box {
    background: #fff3f3;
    border: 1px solid #f9b4b4;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c62828;
    font-size: 13px;
}

.error-box p { margin-bottom: 4px; }
.error-box p:last-child { margin-bottom: 0; }

/* ─── 個人情報ボックス ─── */
.privacy-box {
    background: #f7fbff;
    border: 1px solid #b8dcee;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.privacy-box h3 {
    font-size: 14px;
    font-weight: bold;
    color: #1a5f7a;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #c9e8f5;
}

.privacy-box p {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    line-height: 1.7;
}

.privacy-agree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
    margin-top: 12px;
    cursor: pointer;
}

.privacy-agree-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--theme-color, #1a8fc1);
}

/* ─── 赤字注釈 ─── */
.red-notes {
    margin-bottom: 24px;
    font-size: 12px;
    color: #c62828;
    line-height: 1.9;
}

.red-notes p::before {
    content: '';
}

/* ─── ボタン ─── */
.btn-submit {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 14px 0;
    background-color: var(--theme-color, #1a8fc1);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background-color: #1478a8;
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-back {
    display: inline-block;
    padding: 10px 28px;
    background: #f0f0f0;
    color: #555;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: inherit;
    text-decoration: none;
}

.btn-back:hover {
    background: #e0e0e0;
}

.btn-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 確認画面：戻るボタンと送信ボタンの幅を揃える */
.btn-row form {
    display: inline-block;
}

.btn-row .btn-submit {
    width: 210px;
    display: inline-block;
}

.btn-row .btn-back {
    width: 210px;
    text-align: center;
}

/* ─── 確認画面 ─── */
.confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.confirm-table th,
.confirm-table td {
    padding: 11px 14px;
    border: 1px solid #c9e8f5;
    font-size: 14px;
    vertical-align: top;
    text-align: left;
}

.confirm-table th {
    background: #dff0f7;
    width: 35%;
    font-weight: bold;
    color: #1a5f7a;
    white-space: nowrap;
}

.confirm-table td {
    background: #fff;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ─── 完了画面 ─── */
.complete-box {
    text-align: center;
    padding: 30px 20px;
}

.complete-box .complete-icon {
    font-size: 52px;
    margin-bottom: 16px;
    color: var(--theme-color, #1a8fc1);
}

.complete-box h2 {
    font-size: 20px;
    color: #1a5f7a;
    margin-bottom: 14px;
}

.complete-box p {
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

/* ─── セクション区切り ─── */
.section-divider {
    border: none;
    border-top: 1px solid #d0e8f5;
    margin: 24px 0;
}

/* ─── レスポンシブ ─── */
@media (max-width: 600px) {
    .page-wrapper {
        margin: 10px auto;
        padding: 0 8px 30px;
    }

    .form-container {
        padding: 20px 18px 28px;
    }

    .confirm-table th {
        width: 40%;
    }

    .btn-row {
        flex-direction: column;
    }

    .btn-back {
        order: 2;
    }

    .btn-submit {
        order: 1;
    }
}

/* ─── 住所入力行 ─── */
.address-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.postal-mark {
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

/* ─── ラジオボタングループ ─── */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 6px;
}
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 14px;
}
.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

/* ─── コピーライトフッター ─── */
.site-copyright {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-top: 18px;
    padding-top: 12px;
}

/* ─── 確認画面：送信注意文 ─── */
.confirm-notice {
    background: #fffbec;
    border: 1px solid #f0d080;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}
.confirm-notice p { margin-bottom: 6px; }
.confirm-notice p:last-child { margin-bottom: 0; }
.confirm-notice a { color: #1a5f7a; }

/* ─── 確認画面ボタン行（btn-rowの別名） ─── */
.confirm-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.confirm-buttons form { display: inline-block; }
.confirm-buttons .btn-submit,
.confirm-buttons .btn-send {
    width: 210px;
    display: inline-block;
    padding: 14px 0;
    background-color: var(--theme-color, #1a8fc1);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 1px;
}
.confirm-buttons .btn-back {
    width: 210px;
    text-align: center;
}

/* ─── form-label（mysize_orderなど旧スタイル互換） ─── */
.form-label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 14px;
    color: #222;
}
.form-label.required::after,
label.required::after {
    content: ' 必須';
    display: inline-block;
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}
.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #aacfdf;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafeff;
    -webkit-appearance: none;
}
.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #aacfdf;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background: #fafeff;
    resize: vertical;
    min-height: 120px;
    -webkit-appearance: none;
}
.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--theme-color, #1a8fc1);
    background: #fff;
}
.has-error .form-input, .has-error .form-textarea {
    border-color: #e53935;
    background: #fff8f8;
}
.error-summary {
    background: #fff3f3;
    border: 1px solid #f9b4b4;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #c62828;
    font-size: 13px;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
    margin-top: 12px;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}
.privacy-title {
    font-size: 14px;
    font-weight: bold;
    color: #1a5f7a;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #c9e8f5;
}
.form-submit {
    text-align: center;
    margin-top: 24px;
}
.btn-confirm {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    padding: 14px 0;
    background-color: var(--theme-color, #1a8fc1);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 1px;
}
