@charset "UTF-8";

/* =========================================
   週間空席モニター (Final V7 - PC Fixed / Mobile List)
   ========================================= */

/* --- コンテナ基本設定 --- */
.seat-monitor-container {
    /* PC: 幅650pxに完全固定 (ボタン位置ズレ防止の決定版) */
    width: 650px !important;
    max-width: 650px !important;
    min-width: 650px !important;
    
    margin: 20px auto; 
    padding: 12px 12px 6px 12px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    font-family: "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* --- ヘッダー・ナビゲーション --- */
.monitor-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
}

.header-top-row-js {
    margin-bottom: 8px !important;
}

.monitor-title {
    font-size: 16px;
    font-weight: bold;
    color: #334155;
    margin: 0;
    text-align: center;
    width: 100%;
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
    margin-top: 5px;
}

/* ボタン共通設定 */
.nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px; 
    padding: 6px 12px;
    font-size: 12px; 
    font-weight: bold;
    border-radius: 20px; 
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    border: none; 
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.nav-btn:hover { transform: translateY(-2px); }
.nav-btn.prev { background-color: #fff; color: #64748b; border: 1px solid #cbd5e1; }
.nav-btn.next { background-color: #3b82f6; color: #fff; }
.nav-btn.today { background-color: #15803d; color: #fff; }


/* =========================================
   PC/タブレット用レイアウト (グリッド表示)
   ========================================= */
.monitor-grid {
    display: grid;
    /* 幅650pxの中で強制的に7等分 */
    grid-template-columns: repeat(7, minmax(0, 1fr)); 
    gap: 4px;
    align-items: start !important;
    width: 100%; 
}

/* --- 日付ヘッダー (PC) --- */
.date-header {
    text-align: center;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 4px;
    position: relative;
    overflow: visible;
}

/* 本日マークのアニメーション */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); }
    100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); }
}
.date-header .today-badge {
    display: block;
    position: absolute;
    top: -24px; 
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    background-color: #15803d;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: bold;
    z-index: 10;
    animation: pulse-green 2s infinite;
}

.date-number {
    font-size: 20px;
    font-weight: bold;
    color: #334155;
    line-height: 1.1;
    margin-top: 4px;
}
.day-column.today .date-number { color: #15803d; }

.date-day {
    font-size: 14px;
    font-weight: bold;
    color: #94a3b8;
    line-height: 1.1;
}
.date-day.sat { color: #3b82f6; }
.date-day.sun { color: #ef4444; }

/* --- 縦列設定 (PC) --- */
.day-column {
    display: flex;
    flex-direction: column;
    gap: 1px !important;
    position: relative;
    justify-content: flex-start !important;
    min-width: 0;
}


/* --- カード共通設定 (PC) --- */
.seat-monitor-container .course-card {
    width: 100%;
    height: 90px !important; /* PC高さ */
    min-height: 90px !important;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    cursor: default;
    margin: 0;
    text-align: center;
}

.seat-monitor-container .course-card.empty {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    pointer-events: none;
}
.course-card.full { background-color: #f1f5f9; border-color: #e2e8f0; }

.color-bar {
    width: 80%;
    height: 3px;
    margin: 6px auto 0;
    border-radius: 999px;
    background-color: #e2e8f0;
    display: block; 
}
.course-card.study .color-bar { background-color: #fbbf24 !important; }
.course-card.culture .color-bar { background-color: #15803d !important; }
.course-card.enjoy .color-bar { background-color: #7e22ce !important; }

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2px 2px 6px;
    gap: 4px;
    width: 100%;
}

.course-name {
    font-size: 10px;
    font-weight: bold;
    color: #475569;
    margin-bottom: 0;
    line-height: 1.2;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    margin-top: 6px !important;
}

.status-symbol {
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 300;
    line-height: 1;
    color: #94a3b8;
    margin-top: auto;
    margin-bottom: auto;
}
/* 色設定 */
.course-card.study .status-symbol { color: #d97706 !important; }   
.course-card.culture .status-symbol { color: #15803d !important; } 
.course-card.enjoy .status-symbol { color: #7e22ce !important; }   
.course-card.full .status-symbol { color: #94a3b8 !important; }

.status-symbol.text-mode {
    font-size: 13px !important;
    font-weight: bold !important;
}
.status-text {
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 4px;
}


/* --- レディース大会設定 (PC) --- */
.seat-monitor-container .course-card.tournament {
    height: 181px !important; /* PCは2倍高 */
    min-height: 181px !important;
    border-color: #f472b6 !important;
    background-color: #fdf2f8 !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 0 !important;
}
.seat-monitor-container .course-card.tournament .color-bar {
    background-color: #db2777 !important;
    margin-top: 0;
    position: absolute;
    top: 6px;
    left: 10%; 
}
.seat-monitor-container .course-card.tournament .card-content {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; 
    align-items: center;    
    overflow: hidden;
}
.seat-monitor-container .course-card.tournament .course-name {
    margin-top: 0 !important; 
    margin-bottom: 4px !important;
    font-size: 10px !important;
    white-space: normal !important; 
    word-break: break-all;
    line-height: 1.4;
    width: 90%;
}
.seat-monitor-container .course-card.tournament .status-symbol {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #db2777 !important;
    margin: 0 !important;
}

/* ミニ講義バッジ (PC) */
.lecture-teaser {
    font-size: 9px;
    color: #db2777;
    border: 1px solid #db2777;
    background-color: #fff;
    padding: 1px 4px;
    border-radius: 8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    white-space: nowrap;
    max-width: 95%;
    overflow: hidden; 
    text-overflow: ellipsis;
    box-sizing: border-box;
}
.lecture-teaser .material-icons-round {
    font-size: 9px;
}

/* --- 店休日ブロック (PC) --- */
.closed-block {
    width: 100%;
    height: 181px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #fda4af;
    flex-shrink: 0;
}
.closed-text {
    color: #fb7185;
    font-weight: bold;
    letter-spacing: 0.1em;
    font-size: 16px;
    writing-mode: horizontal-tb;
}

/* =========================================
   モバイル専用レイアウト (縦リスト型・修正版 V8)
   ========================================= */
@media (max-width: 640px) {
    /* 1. コンテナ設定 */
    .seat-monitor-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 10px;
    }

    /* 2. ヘッダー修正 */
    .header-top-row-js {
        flex-direction: column !important;
        gap: 4px; 
        margin-bottom: 8px !important;
    }
    .monitor-title {
        text-align: center !important;
        width: 100%;
        margin: 0;
    }
    .header-top-row-js .nav-btn {
        position: static !important;
        transform: none !important;
        align-self: flex-end; 
        margin-top: 2px;
    }
    .week-navigation {
        justify-content: center !important; 
        width: 100%;
        margin-top: 4px;
    }
    .week-navigation .nav-btn {
        min-width: 70px;
    }

    /* 3. グリッド設定 */
    .monitor-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* 4. 1日分の行レイアウト */
    .day-column {
        display: grid !important;
        grid-template-columns: 44px 1fr 1fr !important;
        gap: 6px !important;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: 8px;
        margin-bottom: 4px;
        align-items: stretch;
        position: relative;
    }

    /* 5. 日付エリア */
    .date-header {
        border-bottom: none !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 0 !important;
        margin: 0 !important;
    }
    .date-number { font-size: 18px; margin-top: 2px; }
    .date-day { font-size: 12px; }
    .date-header .today-badge {
        position: static;
        transform: none;
        margin-bottom: 2px;
        font-size: 9px;
    }

    /* 6. カード高さ設定 */
    .seat-monitor-container .course-card {
        height: 90px !important;
        min-height: 90px !important;
        max-height: 90px !important;
        position: relative;
        padding-top: 18px !important; 
    }

    .color-bar {
        position: absolute;
        top: 6px;
        left: 10%;
        width: 80% !important;
        height: 3px;
        border-radius: 999px;
    }
    
    .card-content {
        justify-content: flex-start !important;
        padding-top: 2px !important; 
        gap: 2px;
    }

    /* 7. レディース大会・店休日の結合設定 */
    .seat-monitor-container .course-card.tournament,
    .closed-block {
        grid-column: 2 / 4 !important;
        height: 90px !important; 
        min-height: 90px !important;
    }
    
    .seat-monitor-container .course-card.tournament .color-bar {
        width: 90% !important;
        left: 5%;
        top: 8px;
    }

    /* ★レディースイベント配置（余白追加版） */
    .seat-monitor-container .course-card.tournament .card-content {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        
        /* ★修正: 中央寄せではなく、上から配置して余白をコントロール */
        justify-content: center !important;
        align-content: flex-start !important; 
        
        /* ★重要: カラーバー(top:8px)との距離を確保するためにpadding-topを追加 */
        padding: 24px 0 0 0 !important; 
        
        gap: 4px; 
        width: 100%;
        height: 100%; /* 高さを一杯に使って配置調整 */
    }

    /* (1) バッジ */
    .lecture-teaser {
        transform: none !important;
        margin: 0 !important;
        width: auto !important;
        flex: 0 0 auto !important; 
        font-size: 10px !important;
        padding: 2px 6px;
        border-width: 1px;
        white-space: nowrap;
        order: 1;
        margin-right: 6px !important;
    }
    
    /* (2) タイトル */
    .seat-monitor-container .course-card.tournament .course-name {
        margin: 0 !important;
        width: auto !important;
        flex: 0 0 auto !important;
        font-size: 13px !important;
        white-space: nowrap;
        order: 2;
        /* バッジと高さを合わせる微調整 */
        margin-top: 1px !important;
    }
    
    .seat-monitor-container .course-card.tournament .course-name br {
        display: none;
    }

    /* (3) 募集中 */
    .seat-monitor-container .course-card.tournament .status-symbol {
        margin-top: 4px !important;
        font-size: 15px !important;
        font-weight: bold;
        height: auto;
        width: 100% !important; 
        flex-basis: 100% !important; 
        text-align: center;
        order: 3;
    }

    /* 店休日の文字サイズ */
    .closed-text {
        font-size: 14px;
    }
}

