/* 予約モーダル */
.reserve_modal_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.reserve_modal_overlay.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 10px;
}

.reserve_modal_content {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    margin: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.reserve_modal_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #ff52b3;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.reserve_modal_header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
}

.reserve_modal_close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.reserve_modal_body {
    padding: 15px 20px;
}

.reserve_modal_cancel_notice {
    margin: 0 0 12px;
    padding: 8px 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #c62828;
    font-size: 12px;
    line-height: 1.5;
}

.reserve_modal_item {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.reserve_modal_item:last-child {
    border-bottom: none;
}

.reserve_modal_item_label {
    width: 100px;
    min-width: 100px;
    font-size: 13px;
    color: #666;
    padding-top: 4px;
}

.reserve_modal_item_value {
    flex: 1;
    font-size: 14px;
}

.reserve_modal_price {
    font-size: 18px;
    font-weight: bold;
    color: #ff52b3;
}

.reserve_modal_item_value select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.reserve_modal_input_number {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 17px;
    text-align: center;
}

.reserve_modal_input_text {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.reserve_modal_radio_label {
    display: block;
    padding: 4px 0;
    font-size: 14px;
    cursor: pointer;
}

.reserve_modal_radio_label input[type="radio"] {
    margin-right: 5px;
}

.reserve_modal_user_info p {
    margin: 3px 0;
    font-size: 13px;
}

/* 利用日: 値を右寄せ + 強調 */
.reserve_modal_item--day .reserve_modal_day_value {
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* 予約者情報セクション（LIFF と同じレイアウト）*/
.reserve_customer_section {
    margin-top: 16px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
}
.reserve_info_row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 4px 0;
    font-size: 13px;
}
.reserve_info_row + .reserve_info_row { border-top: 1px solid #f3f4f6; }
.reserve_info_label {
    flex-shrink: 0;
    color: #6b7280;
    font-size: 12px;
    margin-right: 12px;
}
.reserve_info_row > span:last-child {
    text-align: right;
    color: #111827;
    word-break: break-all;
}

.reserve_modal_footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    justify-content: center;
}

.reserve_modal_btn {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.reserve_modal_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reserve_modal_btn_confirm {
    background: #ff52b3;
    color: #fff;
    width: 100%;
}

.reserve_modal_btn_confirm:hover {
    background: #e04aa0;
}

.reserve_modal_btn_back {
    background: #999;
    color: #fff;
}

.reserve_modal_btn_back:hover {
    background: #777;
}

.reserve_modal_btn_submit {
    background: #ff52b3;
    color: #fff;
    flex: 1;
}

.reserve_modal_btn_submit:hover {
    background: #e04aa0;
}

.reserve_modal_btn_cart {
    background: #28a745;
    color: #fff;
    flex: 1;
}

.reserve_modal_btn_cart:hover {
    background: #218838;
}

.reserve_modal_btn_cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.reserve_modal_footer_confirm {
    flex-wrap: wrap;
    gap: 8px;
}

/* ============================================
   iOS 風 時刻 picker / 料金行
   ============================================ */
.reserve_modal_item--time-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}
.reserve_modal_item--time-row .reserve_modal_time_col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.reserve_modal_item--time-row .reserve_modal_item_label {
    width: auto;
    min-width: 0;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}
.reserve_modal_time_select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    background: #fff;
}
.reserve_modal_time_select:focus {
    outline: 2px solid #ec4899;
    outline-offset: -1px;
}

.reserve_modal_item--price-row {
    display: flex !important;
    align-items: baseline;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.reserve_modal_item--price-row .reserve_modal_duration {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}
.reserve_modal_item--price-row .reserve_modal_price {
    font-size: 22px;
    font-weight: 800;
    color: #ec4899;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   支払方法 iOS 風セグメントコントロール
   ============================================ */
/* 支払方法の行はラベルを上、chipを下に */
.reserve_modal_item--pay {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px;
    padding: 10px 0;
}
.reserve_modal_item--pay .reserve_modal_item_label {
    width: auto;
    min-width: 0;
    padding: 0;
    margin-bottom: 0;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
}

.pay_segments {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    padding: 3px;
    background: #f0f0f3;
    border-radius: 10px;
    width: 100%;
}
/* BuzzPay 表示時は 3列 */
/* 列数の判定も hidden を見る（2026/09/23。style="display:none" から hidden に変えたため） */
.pay_segments:has(#buzzpay_option[hidden]) { grid-template-columns: repeat(2, 1fr); }
.pay_segments:has(#buzzpay_option:not([hidden])) { grid-template-columns: repeat(3, 1fr); }

/* 🔴 `display:none` を JS で入れても、この `!important` が勝って消えなかった（2026/09/23）。
   BuzzPay を使えない会員にも「ポイント」の選択肢が出続けていた原因。
   `[hidden]` を後ろで !important 付きにして、確実に消せるようにしてある（下を参照）。 */
.pay_seg {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 6px;
    background: transparent;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s ease;
    user-select: none;
    margin: 0 !important;
    line-height: 1;
}
.pay_seg input { display: none !important; }
/* 非表示の指定は必ずこれで行う。.pay_seg の display:inline-flex !important に勝たせる（2026/09/23） */
.pay_seg[hidden] { display: none !important; }
.pay_seg_icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.pay_seg:hover { color: #374151; }
.pay_seg:has(input:checked) {
    background: #fff;
    color: #ec4899;
    box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.03);
    font-weight: 700;
}

@media screen and (max-width: 640px) {
    .pay_seg { font-size: 12px; padding: 8px 4px; gap: 3px; }
    .pay_seg_icon { width: 14px; height: 14px; }
}

/* ============================================
   BuzzPay 支払いパネル（フルワイドカード）
   - reserve_modal_item の grid から外して全幅で表示
   ============================================ */
.bp_panel {
    margin: 14px 0 4px;
    padding: 16px 18px 18px;
    background: linear-gradient(180deg, #fdf2f8 0%, #fff 56%);
    border: 1px solid #fce7f3;
    border-radius: 10px;
    /* デザインスペック: パネル内は独自タイポ */
    color: #111827;
}

/* ヘッダー: 「ポイント支払い」 と 「5,100 pt 利用可能」 */
.bp_panel_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 14px;
}
.bp_panel_title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.02em;
}
.bp_panel_balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}
.bp_panel_balance_value {
    font-size: 18px;
    font-weight: 700;
    color: #ec4899;
    font-variant-numeric: tabular-nums;
}
.bp_panel_balance_value strong { font-weight: inherit; }
.bp_panel_balance_label {
    margin-top: 2px;
    font-size: 11px;
    color: #6b7280;
}

.bp_panel_body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 限定ポイント注記 */
.bp_limited_note {
    margin: -6px 0 0;
    padding: 6px 10px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #92400e;
    font-size: 11px;
    border-radius: 6px;
}

/* 使用ポイント入力フィールド */
.bp_field { display: flex; flex-direction: column; gap: 6px; }
.bp_field_label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}
.bp_field_input_row {
    display: flex;
    align-items: stretch;
    gap: 8px;
}
.bp_input_wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color .15s, box-shadow .15s;
}
.bp_input_wrap:focus-within {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, .12);
}
.bp_use_input {
    flex: 1;
    min-width: 0;
    padding: 10px 4px 10px 12px;
    border: 0;
    background: transparent;
    font-size: 17px;
    font-weight: 700;
    text-align: right;
    color: #111827;
    font-variant-numeric: tabular-nums;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: textfield;
}
.bp_use_input:focus { outline: none; }
.bp_use_input::-webkit-inner-spin-button,
.bp_use_input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.bp_input_suffix {
    padding: 0 12px 0 4px;
    font-size: 13px;
    color: #6b7280;
}
.bp_use_max_btn {
    flex-shrink: 0;
    padding: 0 16px;
    background: #ec4899;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .05s;
}
.bp_use_max_btn:hover { background: #db2777; }
.bp_use_max_btn:active { transform: scale(.97); }

.bp_use_hint {
    margin: 0 2px;
    font-size: 11px;
    color: #6b7280;
    min-height: 14px;
}

/* 内訳テーブル */
.bp_breakdown {
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
}
.bp_breakdown_row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 9px 14px;
    margin: 0;
}
.bp_breakdown_row + .bp_breakdown_row { border-top: 1px dashed #f3f4f6; }
.bp_breakdown_row--total {
    margin-top: 2px;
    padding-top: 11px;
    padding-bottom: 11px;
}
.bp_breakdown_label {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}
.bp_breakdown_value {
    margin: 0;
    font-size: 13px;
    color: #111827;
    font-variant-numeric: tabular-nums;
}
.bp_breakdown_value strong { font-weight: 700; }
.bp_breakdown_value--point strong { color: #ec4899; font-size: 15px; }
.bp_breakdown_row--total .bp_breakdown_label { font-size: 13px; font-weight: 600; color: #374151; }
.bp_breakdown_row--total .bp_breakdown_value { font-size: 16px; }
.bp_breakdown_value--short strong { color: #111827; }
.bp_breakdown_row[data-empty="true"] .bp_breakdown_value--short strong { color: #059669; }

/* 不足分の支払方法 */
.bp_sub_section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bp_sub_title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}
.bp_sub_segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.bp_sub_segment:has(.bp_sub_chip:only-child) { grid-template-columns: 1fr; }
.bp_sub_chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all .15s;
    user-select: none;
    margin: 0;
}
.bp_sub_chip:hover { border-color: #d1d5db; }
.bp_sub_chip input { display: none; }
.bp_sub_chip:has(input:checked) {
    background: #ec4899;
    border-color: #ec4899;
    color: #fff;
    box-shadow: 0 1px 3px rgba(236, 72, 153, .25);
}
.bp_sub_chip_icon { font-size: 15px; }

/* 全額ポイント時メッセージ */
.bp_sufficient {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
}
.bp_check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}

/* スマホ対応 */
@media screen and (max-width: 640px) {
    .reserve_modal_overlay.active {
        padding: 10px 5px;
    }

    .reserve_modal_item {
        flex-direction: column;
        padding: 8px 0;
    }

    .reserve_modal_item_label {
        width: auto;
        min-width: auto;
        margin-bottom: 4px;
        font-size: 12px;
        font-weight: 600;
        color: #6b7280;
        padding-top: 0;
    }

    .reserve_modal_header h3 {
        font-size: 13px;
    }

    .reserve_modal_body {
        padding: 12px 16px 16px;
    }

    /* BuzzPay パネル: モバイルでも余白詰めすぎず */
    .bp_panel {
        margin: 12px -4px 4px;
        padding: 14px 14px 16px;
        border-radius: 12px;
    }
    .bp_panel_title { font-size: 13px; }
    .bp_panel_balance_value { font-size: 16px; }
    .bp_panel_body { gap: 12px; }

    .bp_use_input { font-size: 16px; }
    .bp_use_max_btn { padding: 0 14px; font-size: 11px; }

    .bp_breakdown_row { padding: 8px 12px; }
    .bp_breakdown_row--total .bp_breakdown_value { font-size: 15px; }

    .bp_sub_chip { padding: 10px 6px; font-size: 12px; }
    .bp_sub_chip_icon { font-size: 14px; }
}

/* 残額の支払方法（2026/09/23）
   ポイントの残額はオンライン決済だけになったので、選ばせずに何で払うかだけ見せる。
   押せると誤解されないよう、カーソルと hover の反応を外す。 */
.bp_sub_chip--fixed {
    cursor: default;
    background: #f9fafb;
    border-style: dashed;
}
.bp_sub_chip--fixed:hover { border-color: #e5e7eb; }
