/* 会員登録。旧 regist.php のステップバー + フォーム構成を
 * 新 shop のトーン (genre-section / feature 系ボタン) でリファインする。
 * モバイルファースト + @media (width >= 1000px) は既存 shop CSS の慣例。 */

.register-page {
    padding-block: 24px 48px;
}

.reg-title {
    margin-bottom: 16px;
    font-size: 1.4rem;
}

/* ===== ステップバー (旧 regist.php 踏襲・現在ステップを強調) ===== */
.reg-steps {
    display: flex;
    padding: 0;
    margin: 0 0 32px;
    list-style: none;
}

.reg-step {
    position: relative;
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    background: #eee;
    color: #888;
    text-align: center;
}

.reg-step + .reg-step {
    margin-left: 4px;
}

.reg-step.is-current {
    background: #3a3a3a;
    color: #fff;
}

.reg-step.is-current:last-child {
    background: #f0940a;
}

.reg-step-title {
    font-size: 0.8rem;
    font-weight: 700;
}

.reg-step-sub {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
}

/* ===== セクション・フォーム行 ===== */
.reg-section {
    margin-bottom: 32px;
}

.reg-section-title {
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--genre-color, #9c8b5e);
}

.reg-group-title {
    padding-bottom: 6px;
    margin: 28px 0 12px;
    font-size: 0.95rem;
    border-bottom: 1px solid #ccc;
}

.reg-lead {
    line-height: 1.9;
}

.reg-row {
    margin-bottom: 14px;
}

.reg-label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.reg-required {
    margin-left: 2px;
    color: #c00;
}

.reg-note {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #888;
}

.reg-input {
    box-sizing: border-box;
    width: 100%;
    max-width: 420px;
    padding: 8px 10px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* 見た目 (背景・矢印) は共通のセレクト (common.css)。.reg-input の余白を引き継ぐと
 * 右端の矢印に文字が重なるため、矢印分の余白だけ足す。 */
.reg-select {
    padding-right: 32px;
}

/* テキストエリア ($textarea_row)。ブラウザ既定の等幅フォントを避け、幅は入力欄より広く取る
 * (自由記述のため)。フォーム部品の共通語彙なので、利用する画面ではなくここに置く。 */
.reg-textarea {
    max-width: 100%;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
}

/* 入力欄の右にボタンを並べる行 (郵便番号 → 住所補完・会社情報からコピー。旧画面踏襲)。
 * 郵便番号は 7 桁なので入力欄を狭め、空いた幅にボタンを置く。入り切らない画面幅では折り返す。 */
.reg-control {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.reg-control .reg-input {
    width: 150px;
}

.reg-value {
    padding: 6px 0;
    margin: 0;
    font-size: 0.95rem;
    border-bottom: 1px dotted #ddd;
}

.reg-radios,
.reg-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.reg-radio,
.reg-check {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    font-size: 0.9rem;
}

.reg-error {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #c00;
}

.reg-error-global {
    padding: 10px 14px;
    margin-bottom: 20px;
    background: #fdeaea;
    border: 1px solid #e8b4b4;
    border-radius: 4px;
}

/* ===== 規約・同意 ===== */
.reg-terms {
    max-height: 280px;
    padding: 14px;
    overflow-y: auto;
    font-size: 0.8rem;
    line-height: 1.8;
    border: 1px solid #ccc;
    background: #fff;
}

.reg-agree {
    margin-top: 12px;
    font-size: 0.9rem;
}

/* ===== タイプ選択 ===== */
.reg-types {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.reg-type {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    padding: 24px 16px;
    font: inherit;
    cursor: pointer;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 6px;
}

.reg-type.is-selected {
    border-color: #f0940a;
    box-shadow: 0 0 0 2px rgb(240 148 10 / 25%);
}

.reg-type-label {
    font-size: 1rem;
    font-weight: 700;
}

.reg-type-sub {
    font-size: 0.8rem;
    color: #888;
}

/* ===== ボタン ===== */
.reg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 32px;
}

/* ボタンは共通 `.btn` 系 (common.css) を使用。`.reg-actions` はレイアウト用に残す。 */

/* ===== 完了 ===== */
.reg-complete {
    text-align: center;
}

/* ===== FAX による会員登録の案内 ===== */
.reg-fax-downloads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

/* 申し込みの流れ (旧 register_fax.jpg を HTML/CSS 化)。
 * 青い帯を縦に並べ、帯の間に赤い下向き三角を置く。色・寸法は旧画像実測値。 */
.reg-fax-flow {
    display: flex;
    flex-direction: column;
    gap: 30px; /* 帯の間隔。間の赤い三角 (14px + 上余白 8px) はこの中に収める */
    max-width: 500px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.reg-fax-step {
    position: relative;
    padding: 12px 14px;
    color: #fff;
    text-align: left;
    background: #0e6eb7;
}

/* 帯と帯の間の赤い下向き三角 (最後の帯にはつけない) */
.reg-fax-step:not(:last-child)::after {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    width: 0;
    height: 0;
    margin-top: 8px;
    margin-inline: auto;
    content: "";
    border-inline: 14px solid transparent;
    border-top: 14px solid #fe0000;
}

.reg-fax-lead {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.6;
}

.reg-fax-note {
    margin: 4px 0 0;
    font-size: 0.78rem;
    line-height: 1.5;
}

/* FAX 送信先番号は流れの中で目立たせる (本文より一回り大きく) */
.reg-fax-tel {
    font-size: 1.1rem;
}

/* ===== PC (>= 1000px) ===== */
@media (width >= 1000px) {
    .reg-types {
        grid-template-columns: repeat(3, 1fr);
        max-width: 1080px;
    }

    .reg-row {
        display: grid;
        grid-template-columns: 260px 1fr;
        gap: 8px 16px;
        align-items: start;
        max-width: 860px;
    }

    .reg-label {
        padding-top: 8px;
        margin-bottom: 0;
    }

    .reg-row .reg-error {
        grid-column: 2;
    }

    /* 補足付きチェックボックスはラベル列に収まらないため 2 列にまたがらせる */
    .reg-row > .reg-check:has(.reg-note) {
        grid-column: 1 / -1;
    }
}
