/* -------------------------------------------------------------------
 * サーフィンスクール問合せフォーム用スタイルシート (style.css)
 * ------------------------------------------------------------------- */

/* 必須項目を示す赤いアスタリスクのスタイル */
.required::after {
    content: " *"; /* スペースとアスタリスクを挿入 */
    color: #d9534f; /* 赤色 */
    margin-left: 5px;
    font-weight: bold;
}

/* フォームの見た目を整えるための基本CSS */
body {
    font-family: 'Open Sans', sans-serif;
    padding: 10px; /* モバイル向けにpaddingを調整 */
    max-width: 600px;
    margin: 0 auto;
    background-color: #f8f8f8;
}
h1 {
    border-bottom: 2px solid #5cb85c;
    padding-bottom: 5px;
    color: #333;
    text-align: center; /* タイトルを中央寄せ */
}
form p {
    margin-bottom: 15px;
    padding: 15px; /* タッチしやすいようパディングを確保 */
    background-color: #fff;
    border-radius: 8px; /* 角を丸く */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 影を付けて立体感を出す */
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea {
    width: 100%;
    padding: 10px; /* 入力欄を大きくする */
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="number"]:focus, input[type="date"]:focus, textarea:focus {
    border-color: #5cb85c; /* フォーカス時に色を変える */
    outline: none;
}

/* 交通手段/レンタル項目（ラジオボタン・チェックボックス）のグループスタイル */
.choice-group {
    display: flex;
    flex-wrap: wrap; 
    gap: 10px; /* 項目間の隙間 */
    margin-top: 10px;
}
.choice-group label {
    /* 選択肢全体をタッチしやすいようにボタン風にする */
    display: inline-flex; 
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    flex-grow: 1; /* 横幅いっぱいに広がるように */
    justify-content: center;
    min-width: 100px; /* 小さすぎるのを防ぐ */
}
.choice-group label:hover {
    background-color: #f0f0f0;
}
.choice-group input[type="radio"],
.choice-group input[type="checkbox"] {
    width: auto; /* チェックボックス/ラジオボタン自体の幅は自動 */
    margin-right: 8px;
}

/* 必須項目のグループボーダー */
.required-group {
    border-left: 5px solid #5cb85c;
    padding-left: 10px; /* ボーダー分の調整 */
}

input[type="submit"] {
    width: 100%; /* ボタンを全幅にする */
    padding: 12px 20px;
    background-color: #5cb85c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    transition: background-color 0.3s;
}
input[type="submit"]:hover {
    background-color: #4cae4c;
}

/* ラジオボタン・チェックボックスが選択された時のスタイル（視覚的なフィードバック） */
.choice-group label:has(input:checked) {
    background-color: #dff0d8; /* 淡い緑 */
    border-color: #5cb85c;
    font-weight: bold;
}

/* モバイルでの横並びをタブレット・デスクトップで調整 */
@media (min-width: 480px) {
    .choice-group {
        flex-wrap: nowrap; /* 480px以上では折り返さない */
        justify-content: flex-start;
    }
    .choice-group label {
         flex-grow: 0;
    }
}