/* ベースリセット */
.nbg-booking *,
.nbg-complete * {
    box-sizing: border-box;
}

.nbg-booking {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
}

/* ステップタイトル */
.nbg-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2d6a4f;
    border-left: 4px solid #52b788;
    padding-left: 12px;
}

/* セクション */
.nbg-section {
    margin-bottom: 28px;
}

.nbg-section-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #444;
}

.nbg-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #52b788;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

/* カレンダー */
.nbg-calendar {
    border: 1px solid #d8e8df;
    border-radius: 8px;
    overflow: hidden;
    user-select: none;
}

.nbg-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2d6a4f;
    color: #fff;
    padding: 10px 12px;
}

.nbg-calendar-title {
    font-weight: 700;
    font-size: 1rem;
}

.nbg-cal-nav {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 10px;
    line-height: 1;
    border-radius: 4px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.nbg-cal-nav:hover {
    background: rgba(255,255,255,0.2);
}

.nbg-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #e9f5ee;
    text-align: center;
}

.nbg-calendar-weekdays span {
    padding: 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.nbg-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px;
    background: #fff;
}

.nbg-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.nbg-cal-day--available {
    background: #d8f3dc;
    color: #1b4332;
    font-weight: 600;
}

.nbg-cal-day--available:hover,
.nbg-cal-day--available:focus {
    background: #52b788;
    color: #fff;
    outline: 2px solid #2d6a4f;
}

.nbg-cal-day--selected {
    background: #2d6a4f !important;
    color: #fff !important;
}

.nbg-cal-day--full {
    background: #ffe0e0;
    color: #c0392b;
    cursor: not-allowed;
    font-size: 12px;
}

.nbg-cal-day--full::after {
    content: '×';
    position: absolute;
    font-size: 18px;
    font-weight: 700;
    opacity: 0.6;
}

.nbg-cal-day--closed {
    color: #bbb;
    cursor: not-allowed;
}

.nbg-cal-day--empty {
    cursor: default;
}

.nbg-cal-day--past {
    color: #ccc;
    cursor: not-allowed;
}

/* カレンダー凡例 */
.nbg-cal-legend {
    display: flex;
    gap: 16px;
    padding: 8px 12px;
    background: #f9fdf9;
    border-top: 1px solid #d8e8df;
    font-size: 12px;
    flex-wrap: wrap;
}

.nbg-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #555;
}

.nbg-legend--available::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #d8f3dc;
    border-radius: 3px;
    border: 1px solid #52b788;
}

.nbg-legend--full::before {
    content: '×';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #ffe0e0;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #c0392b;
}

.nbg-legend--closed::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #f0f0f0;
    border-radius: 3px;
}

/* 予約前案内ボックス */
.nbg-info-box {
    background: #f0faf4;
    border: 1px solid #52b788;
    border-left: 4px solid #2d6a4f;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #1b4332;
}

/* 人数グリッド（3行レイアウト） */
.nbg-guests-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.nbg-guests-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f9fdf9;
    border: 1px solid #d8e8df;
    border-radius: 8px;
}

.nbg-guests-label {
    display: flex;
    flex-direction: column;
}

.nbg-guests-type {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1b4332;
}

.nbg-guests-note {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

/* 選択中日付ラベル */
.nbg-selected-date-label {
    margin-top: 10px;
    text-align: center;
    font-weight: 600;
    color: #2d6a4f;
    font-size: 0.95rem;
}

/* スロット */
.nbg-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nbg-slot-item {
    border: 2px solid #d8e8df;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nbg-slot-item:hover {
    border-color: #52b788;
    background: #f0faf4;
}

.nbg-slot-item--selected {
    border-color: #2d6a4f;
    background: #d8f3dc;
}

.nbg-slot-item--full {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
}

.nbg-slot-name {
    font-weight: 700;
    font-size: 1rem;
    color: #1b4332;
}

.nbg-slot-time {
    font-size: 0.9rem;
    color: #555;
}

.nbg-slot-available {
    font-size: 0.85rem;
    color: #2d6a4f;
    font-weight: 600;
}

.nbg-slot-full-label {
    font-size: 0.85rem;
    color: #c0392b;
    font-weight: 700;
}

.nbg-slot-parking {
    font-size: 0.78rem;
    margin-top: 3px;
    font-weight: 600;
}

/* 乗り合わせ案内 */
.nbg-carpool-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 3px solid #f9a825;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.82rem;
    color: #5d4037;
    margin-bottom: 12px;
}

/* 人数ステッパー */
.nbg-guests-control {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.nbg-stepper {
    display: flex;
    align-items: center;
    border: 2px solid #d8e8df;
    border-radius: 8px;
    overflow: hidden;
}

.nbg-stepper-btn {
    background: #e9f5ee;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nbg-stepper-btn:hover {
    background: #52b788;
    color: #fff;
}

.nbg-stepper-value {
    min-width: 48px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 8px;
}

.nbg-available-label {
    font-size: 0.85rem;
    color: #555;
}

/* ボタン */
.nbg-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.nbg-btn--primary {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}

.nbg-btn--primary:hover {
    background: #1b4332;
    border-color: #1b4332;
}

.nbg-btn--primary:disabled {
    background: #95a5a6;
    border-color: #95a5a6;
    cursor: not-allowed;
}

.nbg-btn--secondary {
    background: #fff;
    color: #2d6a4f;
    border-color: #2d6a4f;
}

.nbg-btn--secondary:hover {
    background: #e9f5ee;
}

.nbg-btn-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* サマリーボックス */
.nbg-summary-box {
    background: #e9f5ee;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #1b4332;
}

.nbg-summary-box p {
    margin: 4px 0;
}

/* フォーム */
.nbg-form-group {
    margin-bottom: 16px;
}

.nbg-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.nbg-form-group input,
.nbg-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
    font-family: inherit;
}

.nbg-form-group input:focus,
.nbg-form-group textarea:focus {
    outline: none;
    border-color: #52b788;
}

.nbg-form-group input.nbg-field--error,
.nbg-form-group textarea.nbg-field--error {
    border-color: #e74c3c;
}

.nbg-required {
    color: #e74c3c;
    font-size: 0.75rem;
    font-weight: normal;
    margin-left: 6px;
}

.nbg-optional {
    color: #888;
    font-size: 0.75rem;
    font-weight: normal;
    margin-left: 6px;
}

.nbg-field-error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    min-height: 16px;
}

/* 確認テーブル */
.nbg-confirm-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.nbg-confirm-table th,
.nbg-confirm-table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.nbg-confirm-table th {
    width: 120px;
    color: #555;
    font-weight: 600;
    font-size: 0.9rem;
}

.nbg-notice {
    background: #fff9e6;
    border: 1px solid #f0e08a;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #7a6000;
    margin-bottom: 16px;
}

/* エラー */
.nbg-error {
    color: #e74c3c;
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: none;
}

.nbg-error:not(:empty) {
    display: block;
}

/* ローディング */
.nbg-loading {
    text-align: center;
    padding: 32px;
}

.nbg-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #d8e8df;
    border-top-color: #2d6a4f;
    border-radius: 50%;
    animation: nbg-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

/* 完了画面 */
.nbg-complete {
    max-width: 560px;
    margin: 0 auto;
    padding: 32px 16px;
    text-align: center;
}

.nbg-complete-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.nbg-complete-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d6a4f;
    margin-bottom: 24px;
}

.nbg-complete-subtitle {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.nbg-booking-number {
    font-size: 1.4rem;
    font-weight: 700;
    background: #e9f5ee;
    border: 2px solid #52b788;
    border-radius: 8px;
    padding: 12px 24px;
    display: inline-block;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
}

.nbg-complete-email {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 24px;
}

.nbg-complete-info {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px 20px;
    text-align: left;
    margin-bottom: 24px;
}

.nbg-complete-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2d6a4f;
}

.nbg-complete-info ul {
    margin: 0;
    padding-left: 20px;
}

.nbg-complete-info li {
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: #444;
}

/* ── キャンセル・照会ページ用 ──────────────────────── */

/* .nbg-wrap は .nbg-booking のエイリアス */
.nbg-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
}

/* ボタンバリエーション（シングルダッシュ版エイリアス） */
.nbg-btn-primary {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}
.nbg-btn-primary:hover {
    background: #1b4332;
    border-color: #1b4332;
    color: #fff;
    text-decoration: none;
}
.nbg-btn-secondary {
    background: #fff;
    color: #2d6a4f;
    border-color: #2d6a4f;
}
.nbg-btn-secondary:hover {
    background: #e9f5ee;
    text-decoration: none;
}
.nbg-btn-danger {
    background: #c0392b;
    color: #fff;
    border-color: #c0392b;
}
.nbg-btn-danger:hover {
    background: #a93226;
    border-color: #a93226;
}
.nbg-btn-danger:disabled {
    background: #95a5a6;
    border-color: #95a5a6;
    cursor: not-allowed;
}

/* ノーティス バリエーション */
.nbg-notice-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #e74c3c;
    border-radius: 6px;
    padding: 12px 16px;
    color: #c0392b;
    margin-bottom: 16px;
}
.nbg-notice-success {
    background: #f0faf4;
    border: 1px solid #a8d5b5;
    border-left: 4px solid #2d6a4f;
    border-radius: 6px;
    padding: 12px 16px;
    color: #1b4332;
    margin-bottom: 16px;
}

/* 予約サマリーボックス */
.nbg-booking-summary {
    background: #e9f5ee;
    border: 1px solid #a8d5b5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.nbg-booking-summary h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #1b4332;
}

/* サマリーテーブル（.nbg-confirm-table のエイリアス） */
.nbg-summary-table {
    width: 100%;
    border-collapse: collapse;
}
.nbg-summary-table th,
.nbg-summary-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #c8e6d0;
    text-align: left;
    font-size: 0.95rem;
}
.nbg-summary-table th {
    width: 120px;
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* 照会フォーム */
.nbg-form {
    background: #f9fdf9;
    border: 1px solid #d8e8df;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}
.nbg-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
    font-family: inherit;
    box-sizing: border-box;
}
.nbg-input:focus {
    outline: none;
    border-color: #52b788;
}
.nbg-form-actions {
    margin-top: 16px;
}

/* 熟度・品種メモ */
.nbg-cal-memo-dot {
    display: block;
    width: 5px;
    height: 5px;
    background: #f9a825;
    border-radius: 50%;
    margin: 2px auto 0;
}

.nbg-date-memo {
    background: #fff8e6;
    border: 1px solid #f9c74f;
    border-left: 3px solid #f9a825;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.88rem;
    color: #5d4037;
    margin-top: 8px;
    line-height: 1.5;
}

/* 料金サマリー */
.nbg-price-summary {
    background: #f0faf4;
    border: 1px solid #a8d5b5;
    border-left: 3px solid #52b788;
    border-radius: 6px;
    padding: 10px 14px;
    margin: 12px 0 4px;
    font-size: 0.9rem;
    line-height: 1.8;
}
.nbg-price-detail {
    display: block;
    color: #555;
}
.nbg-price-total {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1b5e20;
}
.nbg-price-note {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

/* キャンセル待ちボタン（満員スロット内） */
.nbg-btn-waitlist {
    display: inline-block;
    margin-top: 6px;
    padding: 5px 12px;
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.nbg-btn-waitlist:hover {
    background: #ffe0b2;
    text-decoration: none;
    color: #bf360c;
}

/* 危険ボタン（取り消しなど） */
.nbg-btn--danger {
    background: #c62828;
    color: #fff;
    border-color: #b71c1c;
}
.nbg-btn--danger:hover {
    background: #b71c1c;
}

/* レスポンシブ */
@media (max-width: 480px) {
    .nbg-cal-day {
        font-size: 12px;
    }
    .nbg-confirm-table th {
        width: 90px;
    }
    .nbg-btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
}
