/* ベースレイアウト */
.gg-booking-wrapper {
    display: flex !important;
    gap: 30px;
    max-width: 1100px;
    margin: 20px auto;
    align-items: flex-start;
}

.gg-main-content {
    flex: 2;
    min-width: 0;
}

.gg-sidebar {
    flex: 1;
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    position: sticky;
    top: 20px;
    border: 1px solid #eee;
}

/* ステップ制御 */
.booking-step {
    display: none !important;
}

.booking-step.active {
    display: block !important;
}

/* メニュー：薄い青系 */
.gg-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.menu-card h5 {
    color: #000 !important;
    padding-bottom: 10px;
    font-size: 16px;
    /* font-weight: bold;*/
}

.menu-card {
    background: #f0f7ff;
    /* 薄い青 */
    border: 1px solid #d0e4ff;
    padding: 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}


.menu-card:hover {
    background: #e1efff;
    border-color: #2271b1;
}

.menu-card h4 {
    margin: 0 0 10px;
    color: #333;
    font-size: 15px;
}

/* 戻るボタン（ピル型・テキスト） */
.btn-back-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-back-pill:hover {
    background: #f5f5f5;
}

.back-icon {
    font-size: 18px;
    margin-right: 5px;
    font-weight: bold;
    line-height: 1;
}

/* カレンダー折り畳みボタン（ピル型・テキスト） */
/* ナビゲーション全体の配置 */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    /* スマホ対策 */
    gap: 10px;
}

/* ボタンを並べるコンテナ */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    /* ボタン同士の隙間 */
}

/* 共通のボタンベース（送りボタンと切替ボタン両方に適用） */
.btn-nav-round,
.btn-toggle-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    /* 高さを揃える */
    background: #fff;
    border: 2px solid #2271b1;
    color: #2271b1;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 送りボタン（← →）専用：幅を少し狭めて正円に近く */
.btn-nav-round {
    width: 40px;
    padding: 0;
    font-size: 20px;
    line-height: 1;
}

/* 切替ボタン専用：テキストがあるので幅は自動 */
.btn-toggle-round {
    font-size: 13px;
    gap: 5px;
}

/* ホバーエフェクト（共通） */
.btn-nav-round:hover,
.btn-toggle-round:hover {
    background: #2271b1;
    color: #fff;
}

/* アイコンの色をホバー時に白くするための設定（SVGの場合） */
.btn-toggle-round:hover .toggle-icon {
    filter: brightness(0) invert(1);
}

.toggle-icon {
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%232271b1"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* アイコン：小さくて見えないのを解消 */
.toggle-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="%232271b1"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* カレンダー・時間（選択色を青に） */
.calendar-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
}

.calendar-day.selected {
    background: #2271b1 !important;
    color: #fff !important;
}

.time-btn.selected {
    background: #2271b1 !important;
    color: #fff !important;
}

/* 確認画面 */
.confirm-box {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
}

.confirm-table th {
    text-align: left;
    padding: 10px;
    background: #f9f9f9;
    width: 35%;
    border-bottom: 1px solid #eee;
}

.confirm-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.button-primary {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    font-size: 1.1em;
}

/* カレンダーが縦にならないための強制設定 */
.calendar-weekly-slider {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 5px !important;
    width: 100% !important;
}

.calendar-grid.monthly {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    width: 100% !important;
}

/* 各日付の幅を確保 */
.calendar-day {
    flex: 1 !important;
    min-width: 0 !important;
    padding: 10px 5px !important;
    box-sizing: border-box !important;
}

/* フォームのステップが表示されない問題を防ぐ */
.booking-step {
    display: none;
}

.booking-step.active {
    display: block !important;
}

/* 定休日の色（赤系） */
.calendar-day.status-close {
    background: #ffe5e5 !important;
    border-color: #ffcccc !important;
    color: #cc0000 !important;
    cursor: not-allowed !important;
}

.calendar-day.status-close:hover {
    background: #ffcccc !important;
}

.calendar-day.status-close .day-name,
.calendar-day.status-close .day-num {
    color: #cc0000 !important;
}

/* 過去の日付（グレー系） */
.calendar-day.past {
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* 時間ボタンの基本スタイル */
.time-btn {
    padding: 12px 20px;
    margin: 5px;
    border: 2px solid #2271b1;
    background: #fff;
    color: #2271b1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.time-btn:hover:not(:disabled) {
    background: #2271b1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.time-btn.selected {
    background: #2271b1;
    color: #fff;
}

/* 満席の時間 */
.time-btn.full-time {
    border-color: #d63638;
    color: #d63638;
    background: #fff;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-btn.full-time:hover {
    background: #fff;
    transform: none;
    box-shadow: none;
}

/* 過去の時間（表示する場合） */
.time-btn.past-time {
    border-color: #ccc;
    color: #999;
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.5;
}

.time-btn.past-time:hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

/* disabledボタン */
.time-btn:disabled {
    cursor: not-allowed;
}

/* 時間がない場合のメッセージ */
.no-slots-message {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

/* ============================================
   空き状況シンボル（○△×）
   ============================================ */

/* シンボル共通 */
.day-symbol {
    font-size: 11px;
    font-weight: bold;
    margin-top: 3px;
    line-height: 1;
    letter-spacing: 0;
}

/* ○ 空きあり（青） */
.calendar-day.status-ok .day-symbol {
    color: #16ff0e;
}

/* 選択時は白 */
.calendar-day.selected .day-symbol {
    color: #ffffff;
}

/* △ 残りわずか（オレンジ） */
.calendar-day.status-few .day-symbol {
    color: #d97706;
}

/* × 満席（赤） */
.calendar-day.status-full {
    cursor: not-allowed !important;
}

.calendar-day.status-full .day-symbol {
    color: #d63638;
}

.calendar-day.status-full .day-name,
.calendar-day.status-full .day-num {
    color: #999 !important;
    opacity: 0.7;
}

.calendar-day.status-full:hover {
    background: #fff !important;
    border-color: #eee !important;
}

/* 過去の日付（スケジュールあり・選択不可） */
.calendar-day.status-past {
    background: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    cursor: not-allowed !important;
    opacity: 0.5;
}

/* スケジュールなし / 終日休み（赤・記号なし） */
.calendar-day.status-no-schedule {
    background: #ffe5e5 !important;
    border-color: #ffcccc !important;
    cursor: not-allowed !important;
}

.calendar-day.status-no-schedule:hover {
    background: #ffcccc !important;
    border-color: #ffaaaa !important;
}

.calendar-day.status-no-schedule .day-name,
.calendar-day.status-no-schedule .day-num {
    color: #cc0000 !important;
}

/* ============================================
   スマホ用：下部固定バー
   ============================================ */

/* PC では非表示 */
#gg-bottom-bar {
    display: none;
}

@media (max-width: 768px) {

    /* サイドバーをスマホで非表示 */
    .gg-sidebar {
        display: none !important;
    }

    /* 下部バーを表示 */
    #gg-bottom-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #1a5c96;
        color: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
        /* コンテンツがバーに隠れないよう余白を確保 */
    }

    /* ページ下部の余白（バー分） */
    .gg-booking-wrapper {
        padding-bottom: 56px;
    }

    /* サマリー1行表示エリア */
    #gg-bottom-bar-summary {
        display: flex;
        align-items: center;
        padding: 0 50px 0 15px;
        /* 右側にトグルボタン分の余白 */
        height: 52px;
        font-size: 13px;
        overflow: hidden;
        white-space: nowrap;
    }

    .bottom-bar-item {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 40vw;
    }

    .bottom-bar-sep {
        margin: 0 6px;
        opacity: 0.6;
        flex-shrink: 0;
    }

    /* 展開時の詳細エリア */
    #gg-bottom-bar-detail {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding: 12px 50px 14px 15px;
        background: #174f82;
    }

    .bottom-bar-detail-row {
        display: flex;
        justify-content: space-between;
        font-size: 13px;
        padding: 4px 0;
    }

    .bottom-bar-detail-label {
        opacity: 0.75;
        margin-right: 10px;
        flex-shrink: 0;
    }

    /* トグルボタン（▲▼） */
    #gg-bottom-bar-toggle {
        position: absolute;
        right: 0;
        top: 0;
        height: 52px;
        width: 48px;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-bar-toggle-icon {
        display: inline-block;
        transition: transform 0.2s ease;
    }

    #gg-bottom-bar.expanded .bottom-bar-toggle-icon {
        transform: rotate(180deg);
    }
}