@charset "UTF-8";

body {
    font-family: 'Noto Sans JP', "Helvetica Neue", "Helvetica", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif;
    margin: 0;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-color: #fff;
}

form {
    margin: 0 auto;
    max-width: 800px;
    padding: 0;
    display: flex;
    flex-direction: column;
    /* スマホで中央に寄せるための設定 */
    margin: 0 auto;
    padding: 0 15px; /* 左右のパディングを追加 */
}

h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
    text-align: center;
}

h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-container.guardian-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.form-container.guardian-options .form-group {
    display: flex;
    align-items: center;
    margin-right: 2px; /* 各ラジオボタン間のスペースを調整 */
}

.form-container.guardian-options .form-group:last-child {
    margin-right: 0; /* 最後の要素の右側のスペースを削除 */
}

.form-container.parent-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.form-container.parent-info .form-group {
    flex: 1 1 calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.form-container.parent-info .form-group:last-child {
    margin-right: 0;
}

.form-group label {
    font-size: 16px;
    margin-bottom: 5px;
    text-align: left;
}

.form-group input[type="text"], 
.form-group input[type="date"], 
.form-group input[type="email"], 
.form-group input[type="tel"] {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-bottom: 10px;
}

button {
    background-color: #007BFF;
    border: none;
    color: #fff;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    margin: 10px 0;
}

button:hover {
    background-color: #32EF04;
}

button:focus {
    outline: none;
}

.form-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.child-form-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.child-form-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.form-group {
    flex: 1;
    margin-right: 10px;
}

.form-group:last-child {
    margin-right: 0;
}


.gender-options, 
.allergy-options, 
.eat-options,
.guardian-options {
    display: flex;
    align-items: center;
}

.allergy-options label,
.eat-options label,
.guardian-options label {
    margin-right: 10px;
    font-size: 14px;
}

.parent-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.required {
    color: red;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
    text-align: left;
}

.postcode-label {
    font-size: 16px;
    display: block;
    margin-bottom: 5px; /* ラベルの下にスペースを追加 */
}

.postcode-container {
    display: flex;
    align-items: center;
}

.postcode-group {
    display: flex;
    align-items: center;
    margin-right: 10px; /* テキストボックスとボタンの間にスペースを追加 */
}

.postcode-group input {
    margin-right: 5px; /* 入力フィールド間のスペース */
}

.postcode-group span {
    margin: 0 5px; /* ハイフンの左右にスペースを追加 */
}

button {
    margin-top: 0; /* ボタンの上にスペースを追加しない */
    padding: 10px 20px; /* ボタンのサイズ調整 */
}


.responsive-input {
    width: 150px; /* テキストボックスの幅を調整 */
}

/* ご住所のテキストボックスを指定 */
.group-address input[type="text"] {
    width: 700px; /* 元のサイズの1.5倍 */
    height: 40px; /* 他のテキストボックスと同じ高さ */
    padding: 8px; /* 内側の余白 */
}

/* メールアドレスのテキストボックスを指定 */
.group-email input[type="email"] {
    width: 700px; /* 元のサイズの1.5倍 */
    height: 40px; /* 他のテキストボックスと同じ高さ */
    padding: 8px; /* 内側の余白 */
}

.group-address,
.group-email {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.form-item {
    width: 100%;
    display: flex;
    align-items: center;
}

.child-form-item button {
    margin-top: 10px;
}

/* デスクトップ用スタイル */
@media (min-width: 768px) {
    .form-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .form-group {
        width: calc(100% - 20px); /* 全体の横幅を調整 */
        margin-right: 20px;
    }

    .gender-options, 
    .allergy-options, 
    .eat-options {
        justify-content: flex-start;
    }

    .child-form-container {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .child-form-item {
        width: calc(50% - 10px);
        margin-bottom: 20px;
        margin-right: 10px;
    }

    .child-form-item:nth-child(2n) {
        margin-right: 0;
    }
}

/* スマホ用のスタイル */
@media (max-width: 767px) {
    body {
        padding: 0 15px; /* ボディに左右の余白を追加 */
    }

    form {
        padding: 0 15px; /* フォームに左右の余白を追加 */
    }

    .form-container {
        flex-direction: column;
        align-items: center; /* コンテナ全体を中央揃え */
    }

    .form-group {
        width: 100%;
        margin-right: 0;
        text-align: center; /* 中央揃え */
    }

    .form-container.guardian-options {
        flex-direction: column;
        align-items: center; /* 中央揃え */
    }

    .form-container.parent-info {
        flex-direction: column;
        align-items: center; /* 中央揃え */
    }

    .form-container.parent-info .form-group {
        margin-right: 0;
        margin-bottom: 20px;
        width: 100%;
        text-align: center; /* 中央揃え */
    }

    .child-form-container {
        flex-direction: column;
        align-items: center; /* 中央揃え */
    }

    .child-form-item {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
        text-align: center; /* 中央揃え */
    }

    .group-address input[type="text"],
    .group-email input[type="email"] {
        width: 100%; /* スマホ用に全幅に設定 */
        height: 40px;
    }

    .responsive-input {
        width: 100%;
    }

    button {
        width: 100%; /* スマホ用にボタンの幅を全幅に設定 */
    }
}

.form-container.address-info {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    width: 100%; /* Take up the full width */
}

.form-container.address-info .form-group {
    margin-bottom: 20px; /* Add space between the fields */
}

.postcode-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}