/*
 * form.css
 * MLB フォームページ用スタイル
 * style.css の .contact-form レイアウトに合わせて
 * {$form_data} が出力する table/tr/th/td を整形する
 */

/* ===== フォームページ共通リード文 ===== */
.contact-form-lead {
    text-align: center;
    margin-bottom: 2em;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.8;
}

/* ===== テーブルをdivレイアウトと同等に見せる ===== */
.contact-form .table {
    width: 100%;
    border-collapse: collapse;
    display: block;
    /* tableをblockにしてflexと同等に扱う */
    max-width: 640px;
    margin: 0 auto;
}

.contact-form .table tbody {
    display: block;
}

/* tr → .contact-form-item 相当 */
.contact-form .table tr {
    display: block;
    margin-bottom: 1.5em;
    font-size: 0.875rem;
    /* --fz14 相当 */
}

/* th → .contact-form-label 相当 */
.contact-form .table th {
    display: block;
    text-align: left;
    font-weight: normal;
    margin-bottom: 0.5em;
    color: #333;
    padding: 0;
    border: none;
    background: none;
    white-space: nowrap;
}

/* 必須マーク */
.contact-form .table th .required,
.contact-form .table th .hissu {
    color: #e74c3c;
    font-size: 0.8em;
    margin-left: 0.25em;
}

/* td → input/textarea を内包するコンテナ */
.contact-form .table td {
    display: block;
    padding: 0;
    border: none;
    background: none;
}

/* input / select / textarea の共通スタイル */
.contact-form .table td input[type="text"],
.contact-form .table td input[type="email"],
.contact-form .table td input[type="tel"],
.contact-form .table td input[type="number"],
.contact-form .table td select,
.contact-form .table td textarea {
    width: 100%;
    padding: 0.75em;
    border: 1px solid #e0e0e0;
    border-radius: 0.5em;
    background-color: #fff;
    box-sizing: border-box;
    font-family: inherit;
    font-size: inherit;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
}

.contact-form .table td input[type="text"]:focus,
.contact-form .table td input[type="email"]:focus,
.contact-form .table td input[type="tel"]:focus,
.contact-form .table td select:focus,
.contact-form .table td textarea:focus {
    border-color: #244376;
}

.contact-form .table td input[type="text"]::placeholder,
.contact-form .table td input[type="email"]::placeholder,
.contact-form .table td input[type="tel"]::placeholder,
.contact-form .table td textarea::placeholder {
    color: #ccc;
}

.contact-form .table td textarea {
    height: 8em;
    resize: vertical;
}

/* ===== 確認ページ用（確認テーブル） ===== */
.contact-form .table td p {
    margin: 0;
    padding: 0.5em 0;
    color: #333;
}

/* ===== エラーメッセージ ===== */
.red_txt {
    max-width: 640px;
    margin: 0 auto 1.5em;
    color: #e74c3c;
    font-size: 0.875rem;
}

.red_txt ul {
    list-style: disc;
    padding-left: 1.5em;
}

/* ===== ボタンエリア ===== */
.contact-form-submit {
    text-align: center;
    margin-top: 2em;
    display: flex;
    gap: 1em;
    justify-content: center;
    flex-wrap: wrap;
}

/* 「戻る」ボタン */
.cta-btn.--back {
    background: #6c757d;
    padding: 0.75em 2em;
    font-size: 0.875rem;
}

.cta-btn.--back:hover {
    opacity: 0.85;
}

/* ===== サイトへ戻るリンク ===== */
.contact-form-back {
    text-align: center;
    margin-top: 2em;
}

.contact-form-back a:not(.cta-btn) {
    color: #244376;
    text-decoration: underline;
    font-size: 0.875rem;
}

.contact-form-back a:not(.cta-btn):hover {
    opacity: 0.7;
}

/* ===== プライバシーポリシー ===== */
.contact-form-privacy {
    text-align: center;
    margin-top: 2em;
    margin-bottom: 1.5em;
}

.contact-form-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    cursor: pointer;
    font-size: 0.875rem;
    color: #666;
}

.contact-form-checkbox {
    width: 1.1em;
    height: 1.1em;
    accent-color: #244376;
    cursor: pointer;
    flex-shrink: 0;
}

.contact-form-checkbox-text a {
    color: #244376;
    text-decoration: underline;
}

.contact-form-checkbox-text a:hover {
    opacity: 0.75;
}

/* ===== 送信ボタン disabled 状態 ===== */
.cta-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== フィールドバリデーションエラー ===== */
.js-field-error {
    display: block;
    margin-top: 0.35em;
    color: #e74c3c;
    font-size: 0.8rem;
}

.contact-form .table td input.is-error,
.contact-form .table td textarea.is-error,
.contact-form .table td select.is-error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* 通常時はそのまま、iframe内でのみスクロールを消す */
html.is-iframe {
  overflow: hidden;
}

/* 念のため body も消しておきたい場合は以下も追加 */
html.is-iframe body {
  overflow: hidden;
}