@charset "UTF-8";

/* ============================================================
   お申込みフォーム (contact-form.css の規格に準拠)
   ============================================================ */

/* 全体の枠 */
.contact-form {
    max-width: 820px;   /* 指定の幅 */
    margin: 0 auto;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}

/* 1行の定義 */
.form-row {
    display: flex;
    align-items: flex-start; /* 上揃え */
    padding: 14px 0;
}

/* 1. 全体の仕切り線を消す（21行目付近を書き換え） */
.form-row {
    display: flex;
    align-items: flex-start;
    padding: 14px 0;
}

/* 2. 「お名前」の行だけに線を引く設定（CSSの最後に追記） */
.name-separator {
    border-top: 1px solid #ccc !important; /* お名前の上に実線を表示 */
    padding-top: 25px !important;           /* 線と項目の間の余白 */
    margin-top: 10px !important;            /* 線より上の項目との余白 */
}

/* 左側のラベル（幅固定で左端を揃える要） */
.form-row > label {
    width: 180px;       /* 指定の幅 */
    margin-right: 20px; /* 指定の余白 */
    padding-top: 6px;   /* テキスト位置調整 */
    text-align: right;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;     /* 幅が縮まないように固定 */
}



/* ------------------------------------------------------------
   入力欄のサイズ制御 (ここをcontact-formに合わせる)
   ------------------------------------------------------------ */

/* 基本の入力欄 */
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row select,
.form-row textarea {
    width: 420px;       /* 指定の幅 */
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid #777;
    box-sizing: border-box; /* 枠線を含めた幅にする */
}

/* テキストエリアの高さ */
.form-row textarea {
    height: 150px;
    resize: vertical;
}

/* 日付選択などは少し短くてもOKなら調整（今回は420pxで統一して揃えます） */
.form-row input[type="date"] {
    width: 200px; /* カレンダーだけ少し小さくする場合 */
}

/* ------------------------------------------------------------
   2列並び（姓・名など）の制御
   ------------------------------------------------------------ */
.flex-box {
    display: flex;
    gap: 10px;
    width: 420px; /* 親の幅に合わせる */
}

.flex-box input {
    width: 50% !important; /* 半分ずつ */
}

/* ------------------------------------------------------------
   ラジオボタン・チェックボックス
   ------------------------------------------------------------ */
.form-input-group {
    padding-top: 6px;
    width: 420px;
}
.form-input-group label {
    text-align: left !important;
    width: auto !important;
    margin-right: 15px !important;
    font-weight: normal !important;
    padding-top: 0 !important;
}

/* ------------------------------------------------------------
   住所欄 (縦積みレイアウト)
   ------------------------------------------------------------ */
.form-input-column {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 入力欄ごとの隙間 */
    width: 420px;
}
.zip-wrap {
    display: flex;
    align-items: center;
}
.zip-mark {
    margin-right: 5px;
    font-weight: bold;
}
.zip-wrap input {
    width: 120px !important; /* 郵便番号は短く */
}

/* ------------------------------------------------------------
   規約・ボタンエリア
   ------------------------------------------------------------ */
.privacy-row {
    border-bottom: none;
    margin-top: 20px;
}

/* チェックボックスの文言位置調整 */
.terms-check {
    width: 420px; /* 入力欄と同じ幅に合わせる */
}
.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}
.checkbox-label input {
    width: auto !important; /* チェックボックス自体の幅リセット */
    margin-right: 8px;
    margin-top: 4px;
}

/* アラート文字 */
.alert {
    color: #c00;
    font-size: 11px;
    margin-top: 5px;
    width: 420px;
}

/* 送信ボタンエリア（contact-form.cssの仕様に合わせる） */
.form-actions {
    margin-top: 40px;
    margin-bottom: 40px;
    padding-left: 200px; /* ラベル180px + 余白20px 分空ける */
    text-align: left;
}

.form-actions button {
    font-size: 14px;
    padding: 10px 40px;
    background: #4a2d1a;
    color: #fff;
    border: none;
    cursor: pointer;
}
.form-actions button:hover {
    opacity: 0.8;
}

/* ------------------------------------------------------------
   スマホ対応 (修正版)
   ------------------------------------------------------------ */
@media screen and (max-width: 640px) {
    /* 全体的なリセット */
    .form-row {
        flex-direction: column !important;
        padding: 15px 0 !important;
        display: flex !important;
    }

    /* ラベルを上に配置 */
    .form-row > label {
        width: 100% !important;
        text-align: left !important;
        margin-bottom: 8px !important;
        padding-top: 0 !important;
    }

    /* 1. 楽器選択：PC表示のように横並びにする */
    .form-row .form-input {
        width: 100% !important;
        display: block !important;
    }
    .form-row .form-input label {
        display: inline-block !important; /* 横並び */
        width: auto !important;
        margin-right: 15px !important;
        margin-bottom: 10px !important;
        font-weight: normal !important;
        white-space: nowrap; /* テキストの途中で折れないようにする */
    }

/* 生年月日の入力欄がはみ出る問題の修正 */
.form-row input[type="date"] {
    width: 100% !important;        /* 親の幅に合わせる */
    max-width: 100% !important;    /* 絶対に画面幅を超えない */
    box-sizing: border-box !important; /* パディングと枠線を幅に含める */
    appearance: none;              /* ブラウザ独自のスタイルをリセット */
    -webkit-appearance: none;      /* Safari向けリセット */
    padding: 6px 8px !important;    /* 他の入力欄と高さを合わせる */
    height: 35px;                  /* 高さを明示的に指定して揃える */
    font-size: 16px !important;    /* iPhoneでのズーム防止（16px以上推奨） */
}

    /* 3. 規約同意：文章のはみ出しを修正 */
    .terms-check {
        width: 100% !important;
        padding: 0 !important;
    }
    .checkbox-label {
        display: flex !important; /* チェックボックスと文字を分離 */
        align-items: flex-start !important;
        width: 100% !important;
    }
    .checkbox-label input[type="checkbox"] {
        flex-shrink: 0 !important; /* チェックボックスが潰れるのを防ぐ */
        margin-top: 4px !important;
        width: 20px !important;
    }
    .terms-text {
        flex: 1 !important;
        font-size: 13px !important;
        line-height: 1.6 !important;
        white-space: normal !important; /* 折り返しを許可 */
        word-break: break-all;
    }

    /* その他入力要素の幅統一 */
    .form-row input[type="text"],
    .form-row input[type="email"],
    .form-row input[type="tel"],
    .form-row select,
    .form-row textarea,
    .flex-box,
    .form-input-group,
    .form-input-column {
        width: 100% !important;
    }

    /* 送信ボタン */
    .form-actions {
        padding-left: 0 !important;
        text-align: center !important;
    }

    /* セパレーターの調整 */
    .name-separator {
        border-top: 1px solid #ccc !important;
        padding-top: 25px !important;
        margin-top: 10px !important;
    }
}
/* お名前とフリガナをスマホでも横並びにするための最終修正 */
@media screen and (max-width: 640px) {
    /* 親の縦並び指定を打ち消して横並びにする */
    .form-row .flex-box {
        display: flex !important;
        flex-direction: row !important; 
        gap: 10px !important;
        width: 100% !important;
    }

    /* 姓と名の入力欄を50%ずつに広げる */
    .form-row .flex-box input {
        width: 50% !important;
        flex: 1 !important;
    }
}