/* Oswaldフォント */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500&display=swap');

/* --- 全体レイアウト --- */
#rsv-form-root { width: 100%; max-width: 900px; margin: 0 auto; box-sizing: border-box; font-family: "Noto Sans JP", sans-serif; color: #333; line-height: 1.6; padding: 20px; }
#rsv-form-root .rsv-only-step { display: none; }
#rsv-form-root .rsv-only-step-active { display: block; animation: rsvIn 0.3s ease; }
@keyframes rsvIn { from { opacity: 0; } to { opacity: 1; } }

/* プログレスバー */
#rsv-form-root .rsv-only-progress { display: flex; justify-content: space-between; margin: 20px auto 40px; position: relative; max-width: 600px; padding: 0 10px; }
#rsv-form-root .rsv-only-progress::before { content: ""; position: absolute; top: 15px; left: 0; width: 100%; height: 2px; background: #e0e6ed; z-index: 1; }
#rsv-form-root .rsv-only-p-step { width: 30px; height: 30px; background: #fff; border: 2px solid #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; position: relative; z-index: 2; font-size: 13px; color: #999; }
#rsv-form-root .rsv-only-p-step.active { border-color: #2f6fc2; color: #2f6fc2; background: #eef6ff; }
#rsv-form-root .rsv-only-p-label { position: absolute; top: 35px; left: 50%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; color: #999; }

/* カードデザイン */
#rsv-form-root .rsv-only-grid { display: flex; flex-direction: column; gap: 15px; }
#rsv-form-root .rsv-only-card { padding: 15px 20px !important; margin-bottom: 5px !important; background: #ffffff; border: 2px solid #e3e6ea; border-radius: 6px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); cursor: pointer; transition: all 0.2s ease; display: flex; align-items: flex-start; gap: 12px; width: 100%; box-sizing: border-box; position: relative; }
#rsv-form-root .rsv-only-card.selected { border-color: #2f6fc2 !important; background-color: #f0f7ff !important; box-shadow: inset 0 0 0 1px #2f6fc2 !important; }
#rsv-form-root .rsv-only-card-body { flex: 1; margin-top: -4px; }

/* ラジオ・チェックボックス */
#rsv-form-root input[type="radio"], #rsv-form-root input[type="checkbox"] { transform: scale(1.1); margin-top: 3px; cursor: pointer; }
#rsv-form-root .rsv-only-card input[type="radio"] { margin-top: 5px; pointer-events: none; }

/* STEP 3 レイアウト */
#rsv-form-root .rsv-radio-group { display: flex !important; flex-direction: column !important; width: 100%; gap: 10px; margin-top: 10px; }
#rsv-form-root .sub-method-trigger, #rsv-form-root .method-trigger {
    display: flex; align-items: center !important; width: 100% !important;
    padding: 15px !important; border: 1px solid #eee !important; border-radius: 6px !important;
    cursor: pointer !important; position: relative !important; margin-left: 0 !important;
    background: #fff; box-sizing: border-box; flex-wrap: wrap; 
}
#rsv-form-root .sub-method-trigger.selected, #rsv-form-root .method-trigger.selected { background-color: #f0f7ff !important; border-color: #2f6fc2 !important; }
#rsv-form-root .sub-method-trigger.disabled { opacity: 0.4 !important; cursor: not-allowed !important; pointer-events: none !important; background-color: #f9f9f9 !important; }
#rsv-form-root .sub-method-trigger input, #rsv-form-root .method-trigger input { margin-right: 10px; pointer-events: none; }

/* ナンバリングバッジ */
.number-badge {
    position: absolute !important; z-index: 20 !important; width: 30px !important; height: 30px !important; line-height: 26px !important; font-size: 16px !important; border-radius: 50% !important; background: #2f6fc2 !important; color: #ffffff !important; border: 2px solid #ffffff !important; font-family: 'Oswald', sans-serif !important; font-weight: 500 !important; text-align: center !important; box-shadow: 1px 1px 3px rgba(0,0,0,0.3) !important; display: none;
}
.method-trigger .number-badge { left: -10px !important; top: -10px !important; }
.sub-method-trigger .number-badge { left: -10px !important; top: -10px !important; transform: none !important; }

/* 滞在目安チップ & 文言 */
#rsv-form-root .rsv-stay-time {
    color: #2f6fc2 !important; font-weight: bold; font-size: 12px;
    background: #eef6ff !important; padding: 2px 6px; border-radius: 4px;
    margin-left: 10px !important; white-space: nowrap; display: inline-block; vertical-align: middle;
}
.facility-name, .font-bold { font-weight: bold !important; }
.c-red { color: #d32f2f !important; font-weight: bold !important; font-size: 0.9em; margin-left: 10px; }

/* 個人情報入力 */
#rsv-form-root .rsv-only-input-box { border: 1px solid #ddd; padding: 20px; margin-top: 30px; border-radius: 6px; background: #fff; }
#rsv-form-root .rsv-only-title-line { font-weight: bold; font-size: 1.1em; margin-bottom: 15px; border-bottom: 2px solid #eee; padding-bottom: 5px; color: #2f6fc2; display: inline-block; width: 100%; }
#rsv-form-root .m-input-group { margin-bottom: 18px; }
#rsv-form-root .m-input-label { display: block; font-weight: bold; margin-bottom: 6px; }
#rsv-form-root .m-input-text { width: 100%; border: 1px solid #ccc; padding: 10px; border-radius: 4px; box-sizing: border-box; }
#rsv-form-root .req { background: #d32f2f; color: #fff; font-size: 10px; padding: 2px 4px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
#rsv-form-root .m-input-any { background: #999; color: #fff; font-size: 10px; padding: 2px 4px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
#rsv-form-root .rsv-only-bmi { font-weight: bold; color: #2f6fc2; background: #eef6ff; padding: 5px 12px; border-radius: 20px; margin-left: 15px; display: inline-block; font-size: 14px; }
#rsv-form-root .rsv-radio-inline { display: inline-flex; align-items: center; cursor: pointer; margin-right: 15px; }
#rsv-form-root .rsv-radio-inline input { pointer-events: auto !important; margin-top: 0 !important; margin-right: 5px; }

/* 制御・案内・ボタン */
.rsv-diet-caution { font-weight: bold; font-size: 1.1rem; color: #d32f2f; background: #fff4f4; padding: 10px; border-radius: 4px; border-left: 5px solid #d32f2f; margin: 10px 0; }
.rsv-avail-date-info { color: #0056b3; font-weight: bold; font-size: 14px; margin-top: 5px; }

#rsv-form-root .rsv-only-nav-row { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; align-items: center; }
#rsv-form-root .rsv-only-btn-nav { width: 100%; max-width: 280px; padding: 15px; border-radius: 50px; font-weight: bold; cursor: pointer; border: 2px solid #2f6fc2; font-size: 16px; text-align: center; }
#rsv-form-root .rsv-only-btn-blue { background: #2f6fc2; color: #fff; }
#rsv-form-root .rsv-only-btn-white { background: #fff; color: #2f6fc2; }

/* バリデーションエラー */
.input-error-border { border: 2px solid #d32f2f !important; background-color: #fff8f8; }

/* --- Step4 選択内容確認エリア --- */
.rsv-confirm-box { background-color: #f0f7ff; border: 1px solid #2f6fc2; border-radius: 8px; padding: 20px; margin-bottom: 30px; }
.rsv-confirm-title { font-weight: bold; font-size: 16px; margin-bottom: 15px; color: #333; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.rsv-priority-list { list-style: none; padding: 0; margin: 0; }
.rsv-priority-item { display: flex; align-items: flex-start; margin-bottom: 12px; line-height: 1.6; font-size: 14px; }
.rsv-rank-badge { background-color: #5c6bc0; color: #fff; width: 24px; height: 24px; border-radius: 50%; text-align: center; line-height: 24px; font-size: 11px; font-weight: bold; margin-right: 10px; flex-shrink: 0; margin-top: 2px; font-family: 'Oswald', sans-serif; }
.rsv-stay-time-highlight { color: #2f6fc2 !important; font-weight: bold; background: #fff; padding: 1px 6px; border-radius: 4px; margin-left: 8px; white-space: nowrap; display: inline-block; border: 1px solid #cce0ff; }
.rsv-warning-text { color: #d32f2f; font-size: 12px; font-weight: bold; margin-left: 10px; border-bottom: 1px solid #d32f2f; display: inline-block; }
.rsv-selected-header { background: #eef6ff; border: 1px solid #2f6fc2; color: #2f6fc2; font-weight: bold; padding: 10px 15px; border-radius: 5px; margin-bottom: 20px; display: flex; gap: 20px; }

/* --- Step4 レイアウト (PC: 左右分割 & サイズ固定) --- */
.rsv-hope-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 0;
    padding: 20px !important;
}

/* 左側ラベル */
.rsv-hope-label {
    flex: 0 0 110px !important;
    width: 110px !important;
    text-align: center;
    border-right: 1px dashed #eee;
    margin-right: 20px !important;
    padding-right: 20px !important;
    padding-top: 5px;
    box-sizing: border-box;
}

/* 右側入力エリア (PC) */
.rsv-hope-inputs {
    flex: 1 !important;
    width: auto !important;
    min-width: 0;
    display: flex !important;
    gap: 15px;
    align-items: flex-start;
}
.eng_rsv-hope-inputs {
    flex: 1 !important;
    width: auto !important;
    min-width: 0;
    gap: 15px;
    align-items: flex-start;
}

.rsv-date-input-wrap {
    width: 200px;
    flex-shrink: 0;
}

.rsv-note-input-wrap {
    flex-grow: 0;
    width: auto;
}

/* ★PC用テキストエリアサイズ指定 (475px x 50px) */
.rsv-note-area {
    width: 475px !important;
    height: 50px !important;
    border: 1px solid rgb(204, 204, 204);
    border-radius: 4px;
    box-sizing: border-box;
    line-height: 1.3;
    padding: 5px;
}

/* --- スマホ対応 (最大768px) --- */
@media screen and (max-width: 768px) {
    /* Step1: ラジオボタン調整 */
    #rsv-form-root .rsv-radio-inline { margin-bottom: 10px; display: flex; }
    .sub-method-trigger .number-badge, .method-trigger .number-badge { left: -5px !important; top: -10px !important; }

    /* Step4: 縦並び & 横幅100% */
    .rsv-hope-row {
        flex-wrap: wrap !important;
        flex-direction: column !important;
        padding: 15px !important;
    }
    .rsv-hope-label {
        width: 100% !important;
        flex: none !important;
        border-right: none;
        border-bottom: 1px dashed #eee;
        margin-right: 0 !important;
        margin-bottom: 15px;
        padding-right: 0 !important;
        padding-bottom: 15px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 15px;
    }
    .rsv-hope-label > div { margin: 0 !important; }

    .rsv-hope-inputs {
        flex-direction: column !important;
        gap: 10px;
    }
    .rsv-date-input-wrap, 
    .rsv-note-input-wrap {
        width: 100% !important;
        flex: none;
    }
    .rsv-only-cal, 
    .rsv-note-area {
        width: 100% !important; /* スマホでは横幅一杯 */
        height: 60px !important; /* スマホ用に高さ確保 */
    }
}

/* --- 【重要】強制非表示用クラス --- */
/* これがないと、JSで制御してもオンラインが消えません */
.force-hide {
    display: none !important;
}