/* viewer.css - 閲覧用ページ専用スタイル */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.viewer-controls {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.current-view-label {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

#scheduleTable {
    padding: 20px;
}

.schedule-title {
    display: none;
    /* viewer.htmlのヘッダーで表示するため */
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

th,
td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

th {
    background: #f0f0f0;
    font-weight: bold;
}

.day-header,
.weekday-header {
    width: 60px;
}

.time-header {
    width: 150px;
}

.location-header {
    width: 250px;
}

.weekday-sat {
    color: #0066cc;
    font-weight: bold;
}

.weekday-sun {
    color: #cc0000;
    font-weight: bold;
}

/* 行の背景色 */
.row-sat {
    background-color: #f0f7ff;
}

.row-sun {
    background-color: #fff5f5;
}

.row-base {
    background-color: #fffbe6;
    /* 薄い黄色 */
}

.row-alt {
    background-color: #f6ffed;
    /* 薄い緑色 */
}

.holiday-name {
    font-size: 0.8rem;
    color: #cc0000;
    display: block;
}

.cell-time,
.cell-program,
.cell-location {
    text-align: left;
    vertical-align: top;
}

.program-item {
    padding: 0;
}

.viewer-footer {
    padding: 20px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

/* デフォルトではモバイル用セルを非表示 */
.cell-mobile,
.mobile-header {
    display: none;
}

/* 印刷用 */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
    }

    th,
    td {
        font-size: 0.9rem;
        padding: 5px;
    }

    .cell-mobile,
    .mobile-header {
        display: none !important;
    }
}

/* レスポンシブ (モバイルでも表形式を維持) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.6rem;
    }

    .viewer-controls {
        flex-direction: column;
        gap: 10px;
    }

    #scheduleTable {
        padding: 10px 5px;
        overflow-x: auto;
        /* 横スクロールを許可 */
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* 表が潰れすぎないように最小幅を設定 */
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 8px 5px;
    }

    .day-header,
    .weekday-header {
        width: 40px;
    }

    .time-header {
        width: 100px;
    }

    /* プログラム内容と場所はある程度の幅を確保 */
    .cell-program,
    .program-header {
        min-width: 200px;
    }

    .cell-location,
    .location-header {
        min-width: 150px;
    }

    .program-item {
        padding: 8px 0;
        min-height: auto;
    }
}