/* ================================================
   かごしまキッズクラブ申込フォーム CSS
   ================================================ */

/* ===== 基本設定 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #ffe009; /* 淡いレモンイエロー */
    color: #333;
    font-size: 15px;
    line-height: 1.8;
    padding: 20px 10px;
}

/* ===== フォームコンテナ ===== */
.form-container {
    max-width: 760px;
    margin: 0 auto;
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ===== メインタイトル ===== */
.form-main-title {
    background-color: #2EB6B8; /* 青緑 */
    color: #fff;
    padding: 14px 20px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1px;
    margin: 0;
}

/* ===== フォーム本体 ===== */
form {
    padding: 24px;
}

/* ===== セクション ===== */
.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px dashed #ddd;
}

.form-section:last-of-type {
    border-bottom: none;
}

/* ===== セクションタイトル ===== */
.section-title {
    background-color: #FFF3A0; /* 薄いクリーム色 */
    color: #444;
    border-left: 6px solid #F4C32F; /* 濃いめの黄色アクセント */
    padding: 8px 10px;
    font-size: 17px;
    margin-top: 0;
    margin-bottom: 16px;
    font-weight: 600;
}

.subsection-title {
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #2EB6B8;
    font-weight: 600;
}

/* ===== フォームグループ ===== */
.form-group {
    margin-bottom: 16px;
}

.parent-info-group,
.sibling-info-group {
    background-color: #fffdf5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #f0f0f0;
}

/* ===== ラベル ===== */
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #444;
    font-size: 14px;
}

.form-label.required::after {
    content: " ＊";
    color: #E60033;
    margin-left: 4px;
    font-weight: 700;
}

/* ===== 入力フィールド ===== */
.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #fffdf5;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border: 1.5px solid #2EB6B8;
    background-color: #e8ffff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #999;
}

/* テキストエリア */
.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* セレクトボックス */
select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23666" d="M6 8L0 0h12z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ===== ラジオボタン・チェックボックス ===== */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label,
.checkbox-label {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
}

input[type="radio"],
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    cursor: pointer;
    accent-color: #2EB6B8;
}

/* 施設選択の特別スタイル */
.facility-select {
    background-color: #FFF9E6;
    padding: 16px;
    border-radius: 10px;
    border: 2px solid #F4C32F;
}

.facility-option {
    font-weight: 600;
    color: #333;
}

/* ===== エラーメッセージ・ヒント ===== */
.error-message {
    display: block;
    color: #E60033;
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
    font-style: italic;
}

/* ===== reCAPTCHA ===== */
.recaptcha-wrapper {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.recaptcha-note {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* ===== 送信ボタン ===== */
.submit-wrapper {
    text-align: center;
    margin-top: 32px;
}

.submit-button {
    background-color: #2EB6B8;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 12px 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans JP', sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.submit-button:hover {
    background-color: #239194;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:active {
    transform: scale(0.98);
}

.submit-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* ===== 送信完了メッセージ ===== */
.form-complete {
    background-color: #E9FDF3;
    border: 2px solid #2EB6B8;
    color: #333;
    font-weight: 600;
    padding: 16px;
    border-radius: 10px;
    margin: 20px 24px;
    text-align: center;
    font-size: 16px;
}

/* ===== レスポンシブ対応 ===== */
@media screen and (max-width: 600px) {
    body {
        padding: 10px 5px;
    }

    .form-container {
        border-radius: 12px;
    }

    .form-main-title {
        font-size: 18px;
        padding: 12px 16px;
    }

    form {
        padding: 16px;
    }

    .section-title {
        font-size: 16px;
        padding: 6px 8px;
    }

    .form-input,
    .form-textarea {
        font-size: 16px; /* iOS対策: 16px以上でズーム防止 */
    }

    .submit-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }

    .radio-group,
    .checkbox-group {
        flex-direction: column;
        gap: 10px;
    }

    .parent-info-group {
        padding: 12px;
    }

    .facility-select {
        padding: 12px;
    }

    /* reCAPTCHA のスケール調整 */
    .g-recaptcha {
        transform: scale(0.9);
        transform-origin: center;
    }
}

@media screen and (max-width: 380px) {
    .form-main-title {
        font-size: 16px;
    }

    .g-recaptcha {
        transform: scale(0.8);
    }
}

/* ===== アニメーション ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-complete {
    animation: fadeIn 0.4s ease-out;
}

/* ===== ローディング状態 ===== */
.submit-button.loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== アクセシビリティ ===== */
*:focus-visible {
    outline: 2px solid #2EB6B8;
    outline-offset: 2px;
}

/* ===== プリント対応 ===== */
@media print {
    body {
        background-color: #fff;
    }

    .form-container {
        box-shadow: none;
    }

    .submit-button,
    .recaptcha-wrapper {
        display: none;
    }
}
