/* 全体のリセット */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}


.form-container {
    max-width: 480px; /* フォーム全体の幅をスマホに最適化 */
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
h1 {
    font-size: 24px;
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}
label {
    display: flex; /* フレックスボックスを使う */
    justify-content: center; /* 水平方向に中央揃え */
    align-items: center; /* 垂直方向に中央揃え */
    height: 100%; /* 必要に応じて高さを指定 */
    text-align: center; /* テキスト揃え */
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
    color: #555;
}
/* ラベル専用スタイル(希望モデルは除く) */
.form-group label.special-label {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #000; /* 黒背景 */
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #fff; /* 白字 */
    text-align: center;
    border: 1px solid #444; /* 少し目立つ枠線を追加 */
}
input,
select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.2s ease;
    background-color: #fff;
}
input:focus,
select:focus {
    border-color: #007bff;
}
/* ボタン */
button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
button:hover {
    background-color: #0056b3;
}
button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}
/* ナビゲーション */
.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.navigation button {
    padding: 8px 16px;
    font-size: 14px;
}
/* カレンダー */
.calendar {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}
.calendar-header {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}
.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.day {
    font-weight: bold;
    text-align: center;
    background-color: #f3f3f3;
    padding: 5px;
    border-radius: 5px;
}
.day:nth-child(1) {
    color: red;
}
.day:nth-child(7) {
    color: blue;
}
/* カレンダー日付 - 選択可能 */
.date {
    text-align: center;
    padding: 10px;
    border: 1px solid transparent; /* 初期状態で透明な枠線 */
    border-radius: 5px;
    cursor: pointer;
    background-color: #fff;
    color: #333;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
/* カレンダー日付 - ホバー時 */
.date:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff; /* 枠線の色を変化 */
}

/* カレンダー日付 - 初期状態 */
.date {
    text-align: center;
    padding: 10px;
    border: 1px solid transparent; /* 初期状態で透明な枠線 */
    border-radius: 5px;
    cursor: pointer;
    background-color: #fff;
    color: #333; /* デフォルトは黒 */
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* カレンダー日付 - 選択状態 */
.date.selected {
    background-color: #007bff; /* 背景は青色 */
    color: #fff; /* テキストは白 */
    border-color: #007bff; /* 枠線は青色 */
}

/* 選択不可部分（すべて） */
.date.disabled {
    background-color: #f5f5f5; /* 背景を薄いグレーに */
    color: #333; /* テキストは黒 */
    cursor: not-allowed; /* 選択不可のカーソル */
    border: 1px solid transparent; /* 初期状態で枠線は透明 */
}

/* 選択不可部分のホバーを無効化 */
.date.disabled:hover {
    background-color: #f5f5f5 !important; /* 背景を維持 */
    color: inherit !important; /* テキスト色を変更しない */
    cursor: not-allowed !important; /* 選択不可のカーソル */
    border: 1px solid transparent !important; /* 枠線も透明のまま */
}

/* 選択不可の土曜日 */
.date.disabled.saturday {
    color: #007bff; /* 土曜日は青色を維持 */
    border: 1px solid transparent; /* 初期状態で枠線は透明 */
}

/* 選択不可の土曜日 - ホバー時の動作を完全無効化 */
.date.disabled.saturday:hover {
    color: #007bff !important; /* 土曜日は青色を維持 */
    background-color: #f5f5f5 !important; /* 背景を薄いグレーに固定 */
    border: 1px solid transparent !important; /* 枠線の変更を無効化 */
}

/* 選択不可の日曜日 */
.date.disabled.sunday {
    color: #ff0000; /* 日曜日は赤色を維持 */
    border: 1px solid transparent; /* 初期状態で枠線は透明 */
}

/* 選択不可の日曜日 - ホバー時の動作を完全無効化 */
.date.disabled.sunday:hover {
    color: #ff0000 !important; /* 日曜日は赤色を維持 */
    background-color: #f5f5f5 !important; /* 背景を薄いグレーに固定 */
    border: 1px solid transparent !important; /* 枠線の変更を無効化 */
}

/* 土曜日のスタイル（選択可能な場合） */
.date.saturday {
    color: #007bff; /* 初期状態は青色 */
}

.date.saturday:hover, .date.saturday.selected {
    color: #fff; /* ホバー・選択時は白色 */
    background-color: #007bff; /* 背景は青色 */
    border-color: #007bff; /* 枠線も青色 */
}

/* 日曜日のスタイル（選択可能な場合） */
.date.sunday {
    color: #ff0000; /* 初期状態は赤色 */
}

.date.sunday:hover, .date.sunday.selected {
    color: #fff; /* ホバー・選択時は白色 */
    background-color: #007bff; /* 背景は青色に統一 */
    border-color: #007bff; /* 枠線も青色 */
}


/* ラジオボタン */
.radio-group {
    display: flex;
    gap: 10px;
}
.radio-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: #fff;
}
.radio-button input {
    display: none;
}
.radio-button span {
    color: #555;
    z-index: 1;
}
.radio-button:hover {
    border-color: #007bff;
    background-color: #f9f9ff;
}
.radio-button input:checked + span {
    color: #333;
}
.radio-button input:checked + span::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid #007bff;
    border-radius: 5px;
    box-sizing: border-box;
    pointer-events: none;
    background-color: rgba(0, 123, 255, 0.1);
}
/* 希望モデル選択 */
.model-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2列で表示 */
    gap: 10px;
    margin-top: 10px;
}
.model-option {
    position: relative;
    text-align: center;
    border: 2px solid transparent; /* 初期状態の枠線は透明 */
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s ease, background-color 0.2s ease;
    cursor: pointer;
    padding: 5px; /* テキスト部分も背景に含めるために余白を追加 */
}
.model-option img {
    width: 100%; /* 画像がボックスにフィット */
    height: auto;
    display: block;
    border-radius: 2px;
    margin-bottom: 5px; /* 画像とテキストの間に余白を追加 */
}
.model-option input {
    display: none; /* ラジオボタン本体を非表示 */
}
/* 選択時 */
.model-option input:checked + img,
.model-option input:checked + img + span {
    background-color: rgba(0, 123, 255, 0.3); /* 濃いめの背景色 */
    border-color: #007bff; /* 選択時の外線 */
}
/* テキスト部分のデザイン */
.model-option span {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}
/* ホバー時 */
.model-option:hover {
    border-color: #007bff; /* ホバー時にのみ枠線を表示 */
}
/* 時間選択用ラジオボタン（3カラム） */
.time-radio-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
/* 何を見て応募（3カラム） */
.referral-source-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
/* テキスト入力フォーム */
.text-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-top: 5px;
}
.text-input:focus {
    outline: none;
    border-color: #007bff; /* フォーカス時の境界線色 */
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* フォーカス時の影 */
}
/* 送信ボタン */
.submit-button {
    width: 100%;
    padding: 14px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.submit-button:hover {
    background-color: #0056b3;
}
/* パソコン表示時に全体の幅を広げる（レイアウトを調整） */
@media (min-width: 768px) {
    /* 全体の背景（body） */
    body {
        max-width: 700px; /* 背景全体の最大幅を1.5倍程度に */
        margin: 0 auto; /* 背景を中央揃え */
        padding: 0 20px; /* 左右に余白を追加 */
    }

    /* カレンダー、フォーム、車選択部分 */
    .calendar,
    .form-group,
    .car-selection {
        width: 100%; /* 要素の幅を画面幅に合わせる */
        max-width: 650px; /* 最大幅を適度に調整 */
        margin: 0 auto; /* センター揃え */
    }

    /* 車選択部分をグリッドレイアウトに */
    .car-selection {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 列を自動調整 */
        gap: 20px; /* 各アイテム間のスペース */
    }

    /* 車選択部分の画像 */
    .car-selection img {
        width: 100%; /* 親要素に合わせた幅 */
        height: auto; /* アスペクト比を維持 */
    }
    /* 背景に合わせてフォームを広げる */
    .form-container {
        width: 100%; /* 幅を最大化 */
        max-width: 650px; /* 最大幅を調整 */
        margin: 0 auto; /* センター揃え */
    }

    /* 各画像をグリッドに収める */
    .model-selection img {
        width: 100%; /* 親要素に合わせる */
        height: auto; /* アスペクト比を維持 */
    }
}

@media (max-width: 768px) {
    .model-selection {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 常に2列 */
    }
}
@media (max-width: 480px) {
    .form-container {
        padding: 15px;
    }
    h1 {
        font-size: 20px;
    }
    .radio-button {
        padding: 10px;
        font-size: 14px;
    }
    .submit-button {
        font-size: 16px;
    }
}

/* 警告メッセージ用スタイル */
#friend-warning {
    text-align: center;
    padding: 20px;
    border: none; /* 枠線を削除 */
    background-color: white; /* 背景色を白に統一 */
    border-radius: 0; /* 角を丸くしない */
    margin: 20px auto;
    max-width: 600px;
}

/* 警告メッセージのテキスト */
.friend-warning-text {
    font-size: 20px; /* フォントサイズを調整 */
    color: #333; /* 濃い文字色 */
    line-height: 1.6; /* 行間を広めに */
}

/* LINE画像のスタイル */
.line-image {
    max-width: 100%; /* 親要素に合わせる */
    height: auto;
    margin: 15px 0;
}

/* QRコード説明のスタイル */
.qr-instructions {
    font-size: 18px; /* 大きめのフォント */
    color: #333; /* 濃い文字色で読みやすく */
    line-height: 1.6; /* 行間を広く */
    margin-bottom: 20px;
}

/* QRコード説明の強調部分 */
.qr-emphasis {
    font-size: 22px; /* 強調用フォントサイズ */
    font-weight: bold;
    color: #000; /* 黒で強調 */
}

/* 友達登録ボタン */
.friend-button {
    display: inline-block;
    background-color: #00c300; /* 緑色 */
    color: #fff;
    text-decoration: none;
    padding: 12px 24px; /* 余白を広めに */
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
}

.friend-button:hover {
    background-color: #00a000; /* ホバー時の濃い緑 */
}

