/**
 * 週間スケジュール公開ページ用スタイルシート
 * Author: chiilabo
 * URL: chiilabo.jp
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Sans', sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

body.is-week-transitioning .container {
    opacity: 0.55;
    transform: translateX(var(--week-transition-shift, 0));
}

body.is-week-dragging .container {
    opacity: 1;
    transform: translateX(var(--week-drag-shift, 0));
    transition: none;
}

.header {
    margin-bottom: 24px;
}

.header-brand {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0px;
    gap: 10px;
    align-items: center;
}

.brand-link {
    display: inline-flex;
}

.brand-logo {
    display: inline-block;
    width: 42px;
    height: auto;
}

.schedule-title {
    background: #ECEDDA;  /* ベージュ系の背景色 */
    padding: 8px;
    border-radius: 2px;
}

h1 {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
}

.week-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.week-btn {
    padding: 9px 14px;
    border: 0;
    background: #e8ebf0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    color: #4a5562;
}

.week-btn.active {
    background: #4285f4;
    color: white;
    transform: translateY(-1px);
}

.week-btn:hover:not(.active) {
    background: #dce2ea;
}

.schedule {
    overflow: hidden;
}

.schedule-carousel {
    overflow: hidden;
    touch-action: pan-y;
    margin-top: 20px;
}

.schedule-track {
    display: flex;
    width: 100%;
    will-change: transform;
}

.week-panel {
    flex: 0 0 100%;
    min-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

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

th {
    background: #ECEDDA;
    font-weight: 600;
    font-size: 14px;
    padding: 4px;
}

.month-cell {
    font-size: 16px;
    font-weight: 600;
}

.day-header {
    font-size: 12px;
}

.date-number {
    font-size: 22px;
    font-weight: 600;
}

.time-label {
    font-weight: 600;
    font-size: 16px;
}

.time-sub {
    font-size: 12px;
    color: #666;
}

.status {
    font-size: 36px;
    font-weight: bold;
}

.available {
    color: #34a853;
}

.unavailable {
    color: #ea4335;
}

.tentative {
    color: #f29900;
}

.draft {
    color: #999;
}

.footer {
    margin-top: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
}

.footer-message {
    font-size: 10px;
    width: max-content;
    padding: 2px;  /* 余白を追加 */
}

.timestamp {
    width: fit-content;
    margin-right: 0;
    margin-left: auto;
    font-size: 10px;
    background: #5a5a5a;  /* グレーの背景 */
    color: white;  /* 文字色を白に */
    padding: 2px;  /* 余白を追加 */
}

.admin-link {
    display: inline;
}

.admin-link a {
    color: #fff;
    text-decoration: none;
}

.admin-link a:hover {
    color: #fff;
}

.past {
    color: #ccc !important;
}

.status-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.status-link:hover {
    background-color: #e8f5e9;
}

.status-link:active {
    background-color: #c8e6c9;
}

.description {
    margin: 40px auto;
    width: fit-content;
    font-size: 14px;
    line-height: 1.7;
}
.description em {
    color: red;
    font-weight: bold;
}

@media (max-width: 640px) {
    .container {
        border-radius: 0;
        padding: 8px;
        box-shadow: none;
    }

    .week-selector {
        justify-content: stretch;
        flex-wrap: nowrap;
        gap: 4px;
    }

    .week-btn {
        flex: 1 1 0;
        min-width: 0;
        width: 25%;
        padding: 8px 0;
        font-size: 12px;
        border-radius: 12px;
    }

    th,
    td {
        padding: 3px;
    }

    .date-number {
        font-size: 20px;
    }

    .time-label {
        font-size: 14px;
    }

    .time-sub {
        font-size: 11px;
    }

    .status {
        font-size: 32px;
    }
}
