/* ---- YS-Booking 患者向けフォーム ---- */
.ysb-booking-wrap { font-family: 'Noto Sans JP', sans-serif; color: #1d2327; }

/* レイアウト：最初はカレンダーだけ中央表示 */
.ysb-bk-layout { }
.ysb-bk-calendar { max-width: 440px; margin: 0 auto; }
.ysb-bk-slots    { display: none; }

/* 日付選択後：横並びに切り替え */
.ysb-bk-layout.has-slots {
    display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap;
}
.ysb-bk-layout.has-slots .ysb-bk-calendar { width: 380px; max-width: none; margin: 0; flex-shrink: 0; }
.ysb-bk-layout.has-slots .ysb-bk-slots    { display: block; flex: 1; min-width: 240px; }
.ysb-bk-hint { color: #aaa; margin-top: 32px; }

/* ---- カレンダー（管理画面と共通スタイル） ---- */
.ysb-booking-wrap .ysb-cal-table {
    width: 100%; border-collapse: collapse; border: 1px solid #c3c4c7;
}
.ysb-booking-wrap .ysb-cal-nav-row td {
    padding: 10px 14px; background: #fff;
    border-bottom: 1px solid #c3c4c7;
    font-size: 17px; font-weight: bold; text-align: center; position: relative;
}
.ysb-booking-wrap .ysb-bk-nav-prev,
.ysb-booking-wrap .ysb-bk-nav-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: #0073aa; font-size: 14px;
    padding: 4px 10px; user-select: none;
}
.ysb-booking-wrap .ysb-bk-nav-prev:hover,
.ysb-booking-wrap .ysb-bk-nav-next:hover { color: #005177; }
.ysb-booking-wrap .ysb-bk-nav-prev { left: 10px; }
.ysb-booking-wrap .ysb-bk-nav-next { right: 10px; }

.ysb-booking-wrap .ysb-cal-dayname {
    text-align: left; padding: 5px 8px;
    font-weight: bold; font-size: 12px; color: #1d2327;
    background: #f6f7f7; border: 1px solid #c3c4c7;
}
.ysb-booking-wrap .ysb-cal-dayname.sun { color: #c62828; }
.ysb-booking-wrap .ysb-cal-dayname.sat { color: #1565c0; }

.ysb-booking-wrap .ysb-cal-cell {
    width: calc(100% / 7); height: 52px; vertical-align: top;
    padding: 5px 7px; border: 1px solid #c3c4c7;
    background: #fff; cursor: pointer; font-size: 13px;
    transition: background .15s;
}
.ysb-booking-wrap .ysb-cal-cell:hover       { background: #e3f2fd; }
.ysb-booking-wrap .ysb-cal-cell.other-month { background: #f6f7f7; color: #ccc; pointer-events: none; }
.ysb-booking-wrap .ysb-cal-cell.disabled    { background: #f6f7f7; color: #bbb; cursor: default; pointer-events: none; }
.ysb-booking-wrap .ysb-cal-cell.today       { background: #e8f4fd; }
.ysb-booking-wrap .ysb-cal-cell.today .ysb-cal-day-num { color: #0073aa; font-weight: bold; }
.ysb-booking-wrap .ysb-cal-cell.selected    { background: #0073aa; }
.ysb-booking-wrap .ysb-cal-cell.selected .ysb-cal-day-num { color: #fff !important; }
.ysb-booking-wrap .ysb-cal-cell.sun .ysb-cal-day-num { color: #c62828; }
.ysb-booking-wrap .ysb-cal-cell.sat .ysb-cal-day-num { color: #1565c0; }
.ysb-booking-wrap .ysb-cal-day-num { font-size: 13px; display: block; }

/* ---- スロット一覧 ---- */
.ysb-slot-list {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px;
}
.ysb-slot-btn {
    padding: 8px 14px; border: 1px solid #0073aa; border-radius: 4px;
    background: #fff; color: #0073aa; font-size: 14px; font-weight: bold;
    cursor: pointer; transition: background .15s, color .15s;
}
.ysb-slot-btn:hover  { background: #0073aa; color: #fff; }
.ysb-slot-btn.full   { border-color: #ccc; color: #bbb; cursor: default; }
.ysb-slot-btn[disabled] { border-color: #ccc; color: #bbb; cursor: default; }
.ysb-bk-slots-date   { font-weight: bold; margin: 0 0 10px; font-size: 15px; }

/* ---- フォーム ---- */
.ysb-bk-form-wrap { max-width: 480px; }
.ysb-bk-selected-info {
    font-size: 16px; font-weight: bold; color: #0073aa;
    padding: 10px 14px; background: #e8f4fd;
    border-radius: 4px; margin-bottom: 16px;
}
.ysb-bk-form label {
    display: block; margin-bottom: 14px;
    font-size: 14px; color: #444;
}
.ysb-bk-form label input:not([type="checkbox"]):not([type="radio"]),
.ysb-bk-form label textarea {
    display: block; width: 100%; margin-top: 4px;
    padding: 8px 10px; font-size: 15px;
    border: 1px solid #c3c4c7; border-radius: 4px;
    box-sizing: border-box;
}
.ysb-bk-form label textarea { resize: vertical; }
.ysb-req { color: #c62828; margin-left: 2px; }
.ysb-bk-actions { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.ysb-btn-primary {
    padding: 10px 24px; background: #0073aa; color: #fff;
    border: none; border-radius: 4px; font-size: 15px;
    font-weight: bold; cursor: pointer;
}
.ysb-btn-primary:hover { background: #005177; }
.ysb-btn-sub {
    padding: 10px 16px; background: #fff; color: #555;
    border: 1px solid #c3c4c7; border-radius: 4px;
    font-size: 14px; cursor: pointer;
}
.ysb-btn-sub:hover { background: #f6f7f7; }

/* ---- 確認事項・チェックボックス ---- */
.ysb-bk-notice-wrap {
    margin-top: 8px; padding: 12px 16px;
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 4px;
}
.ysb-bk-notice-list {
    margin: 0 0 10px; padding-left: 20px; font-size: 13px; color: #555;
}
.ysb-bk-notice-list li { margin-bottom: 4px; }
.ysb-bk-check-label {
    display: flex; align-items: flex-start; gap: 8px;
    cursor: pointer; font-size: 14px; margin-top: 4px;
}
.ysb-bk-check-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

/* ---- 初診：診療内容チェックボックス ---- */
.ysb-bk-fieldset {
    border: 1px solid #c3c4c7; border-radius: 4px;
    padding: 12px 16px; margin: 12px 0;
}
.ysb-bk-fieldset legend {
    font-size: 14px; color: #444; padding: 0 6px; font-weight: bold;
}
.ysb-menu-list {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px; margin-top: 8px;
}
/* .ysb-bk-form label { display:block } より詳細度を上げて flex を確保 */
.ysb-bk-form .ysb-menu-item {
    display: flex; align-items: flex-start; justify-content: flex-start; gap: 6px;
    font-size: 13px; cursor: pointer; line-height: 1.5; margin-bottom: 0;
    width: 100%;
}
.ysb-bk-form .ysb-menu-item input[type="checkbox"],
.ysb-bk-form .ysb-menu-item input[type="radio"] {
    width: auto; margin: 3px 0 0; padding: 0; flex: 0 0 auto;
}
.ysb-bk-form .ysb-menu-item.disabled { color: #bbb; cursor: default; }
.ysb-bk-form .ysb-menu-item.disabled::after { content: "（土曜は不可）"; font-size: 11px; color: #c62828; }

/* ---- 完了画面 ---- */
.ysb-bk-done-box {
    text-align: center; padding: 40px 24px;
    border: 1px solid #c3c4c7; border-radius: 8px;
    max-width: 420px; margin: 0 auto;
}
.ysb-bk-done-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: #2e7d32; color: #fff;
    font-size: 30px; line-height: 60px;
    margin: 0 auto 16px;
}
.ysb-bk-done-box h3 { margin: 0 0 12px; font-size: 20px; color: #1d2327; }
.ysb-bk-confirm-date { font-size: 17px; font-weight: bold; color: #0073aa; margin: 0 0 8px; }
.ysb-bk-confirm-note { font-size: 13px; color: #666; margin: 0; }

/* ---- バッジ ---- */
.ysb-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:bold; }
.ysb-badge-revisit { background:#e8f4fd; color:#0073aa; }
.ysb-badge-new     { background:#e8f8e8; color:#2e7d32; }
.ysb-badge-diet    { background:#fff3e0; color:#e65100; }

/* ---- あなたの予約パネル ---- */
.ysb-my-reservations {
    margin-top: 40px; padding-top: 24px;
    border-top: 2px solid #e3e3e3;
}
.ysb-my-res-title {
    font-size: 16px; font-weight: bold; margin: 0 0 12px; color: #1d2327;
}
.ysb-my-table {
    width: 100%; border-collapse: collapse; font-size: 13px; max-width: 600px;
}
.ysb-my-table th, .ysb-my-table td {
    padding: 8px 10px; border: 1px solid #ddd; text-align: left;
}
.ysb-my-table th { background: #f6f7f7; font-weight: bold; color: #444; }
.ysb-my-cancel-btn {
    padding: 4px 12px; font-size: 12px; border: 1px solid #c62828;
    color: #c62828; background: #fff; border-radius: 4px; cursor: pointer;
}
.ysb-my-cancel-btn:hover { background: #c62828; color: #fff; }
.ysb-my-cancel-btn:disabled { border-color: #ccc; color: #ccc; cursor: default; }

/* ---- 受診方法（来院/オンライン）ラジオ ---- */
.ysb-field-label { font-size: 14px; color: #444; margin: 0 0 8px; }
.ysb-visit-mode { display: flex; gap: 10px; flex-wrap: wrap; }
.ysb-visit-mode-wrap { margin-bottom: 18px; }
.ysb-visit-mode-opt {
    display: flex; align-items: center; gap: 6px;
    font-size: 14px; color: #444; cursor: pointer;
    padding: 6px 16px; border: 1px solid #c3c4c7;
    border-radius: 20px; user-select: none;
    transition: border-color .15s, background .15s;
}
.ysb-visit-mode-opt:hover { border-color: #0073aa; }
.ysb-visit-mode-opt.disabled { color: #bbb; border-color: #e0e0e0; cursor: default; background: #f6f7f7; }
.ysb-visit-mode-opt input[type="radio"] { cursor: pointer; }
.ysb-online-sat-msg { font-size: 12px; color: #888; margin: 6px 0 0; }

/* ---- OTP認証ステップ（再診） ---- */
.ysb-otp-wrap {
    max-width: 480px;
    padding: 24px 28px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    background: #f9f9f9;
}
.ysb-otp-title {
    font-size: 16px; font-weight: bold;
    margin: 0 0 8px; color: #1d2327;
}
.ysb-otp-desc {
    font-size: 13px; color: #555;
    margin: 0 0 20px; line-height: 1.7;
}
.ysb-otp-row {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 4px; flex-wrap: wrap;
}
.ysb-otp-row input {
    font-size: 22px; letter-spacing: 8px;
    width: 140px; padding: 8px 12px;
    border: 2px solid #0a3d62; border-radius: 4px;
    text-align: center; font-family: monospace;
    box-sizing: border-box;
}
.ysb-otp-resend-row {
    display: flex; align-items: center;
    gap: 10px; margin-top: 16px;
}
#ysb-otp-cd { font-size: 12px; color: #888; }
.ysb-otp-back-btn { margin-top: 12px; font-size: 12px; display: block; }

/* ---- キャンセルページ [ysb_cancel] ---- */
.ysb-cancel-page { max-width: 480px; margin: 0 auto; padding: 20px 0; }
.ysb-cancel-box {
    border: 1px solid #c3c4c7; border-radius: 8px; padding: 28px 32px;
}
.ysb-cancel-title {
    font-size: 20px; font-weight: bold; margin: 0 0 20px; color: #1d2327;
}
.ysb-cancel-info {
    background: #f6f7f7; border-radius: 4px;
    padding: 12px 16px; margin-bottom: 20px;
}
.ysb-cancel-info p { margin: 4px 0; font-size: 14px; }
.ysb-btn-cancel {
    padding: 10px 24px; background: #c62828; color: #fff;
    border: none; border-radius: 4px; font-size: 15px;
    font-weight: bold; cursor: pointer;
}
.ysb-btn-cancel:hover   { background: #b71c1c; }
.ysb-btn-cancel:disabled { background: #ccc; cursor: default; }
.ysb-cancel-msg-text { font-size: 14px; margin-top: 16px; }

/* ---- 再診メニュー事前選択（Step 0） ---- */
.ysb-menu-pre-wrap { max-width: 460px; }
.ysb-menu-pre-title {
    font-weight: 700; font-size: 1.05em; margin: 0 0 14px;
}
.ysb-menu-pre-list {
    display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px;
}
.ysb-menu-pre-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px;
    border: 2px solid #c3c4c7; border-radius: 6px;
    cursor: pointer; font-size: 0.95em;
    transition: border-color .15s, background .15s;
    background: #fff; user-select: none;
}
.ysb-menu-pre-item:hover { border-color: #0073aa; background: #f0f7fb; }
.ysb-menu-pre-item:has(input:checked) {
    border-color: #0073aa; background: #e8f4fb; font-weight: 600;
}
.ysb-menu-pre-item input[type="radio"] {
    width: 18px; height: 18px; accent-color: #0073aa;
    flex-shrink: 0; cursor: pointer;
}

/* 注意喚起モーダル */
.ysb-notice-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
    z-index: 100000; padding: 20px;
}
.ysb-notice-box {
    background: #fff; border-radius: 10px;
    max-width: 420px; width: 100%; padding: 24px 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .25); text-align: center;
}
.ysb-notice-text {
    font-size: 15px; line-height: 1.7; color: #333;
    margin: 0 0 18px; text-align: left;
}
.ysb-notice-ok { min-width: 120px; }
