/**
 * 予約状況シート(共通)
 * /public_html/assets/reserve-sheet.css
 *
 * セラピスト一覧 / 出勤ページ / セラピスト詳細 の3ページで共有。
 * shop.css の後に読み込む前提(--shop-* / 1rem=10px を共有)。
 *
 * PC = 中央モーダル / SP(〜700px) = 下からせり上がるボトムシート
 */

/* ─────────────────────────────
   「予約状況を見る」ボタン
   ───────────────────────────── */
.rsv-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
    padding: 11px 8px;
    border: none;
    background: linear-gradient(to bottom, #FF9BA2 0%, #F95A6B 75%, #F85164 100%);
    color: #fff;
    font-family: inherit;
    border-radius: var(--shop-radius);
    font-size: 1.3rem;
    letter-spacing: .04em;
    line-height: 1.4;
    width: 90%;
    margin: 0 auto 5px auto;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: filter .15s, opacity .15s;
}

.rsv-btn i {
    flex-shrink: 0;
    color: #fff;
    font-size: 1.3rem;
}

.rsv-btn:hover {
    opacity: .85;
}

.rsv-btn:active {
    filter: brightness(.95);
}

.rsv-btn:disabled,
.rsv-btn.is-disabled {
    filter: grayscale(1);
    opacity: .45;
    pointer-events: none;
}

/* 単独で置くとき(セラピスト詳細など) */
.rsv-btn--wide {
    padding: 15px;
    border-radius: var(--shop-radius, 8px);
    font-size: 1.45rem;
}

/* ─────────────────────────────
   シート本体
   ───────────────────────────── */
.rs {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

.rs.is-open {
    display: block;
}

.rs__ov {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(2px);
    animation: rs-fade .2s ease;
}

@keyframes rs-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.rs__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    width: min(760px, 94vw);
    max-height: 88vh;
    overflow: hidden;
    border: 1px solid var(--shop-gold-dim);
    border-radius: 4px;
    background: var(--shop-bg-card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
    animation: rs-pop .22s cubic-bezier(.2, 1.2, .4, 1);
    border-radius: var(--ap-radius);
    background: var(--ap-panel-v2);
}

@keyframes rs-pop {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(.98);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.rs__head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--shop-border);
    background: var(--shop-bg-card-alt);
}

.rs__ph {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--shop-gold-dim);
    background: #000;
    color: var(--shop-text-mute);
    font-size: 1.8rem;
}

.rs__ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rs__who {
    flex: 1;
    min-width: 0;
}

.rs__name {
    color: var(--shop-text);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rs__sub {
    color: var(--accent-ore, #fa8700);
    font-size: 1.15rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

.rs__close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 1px solid var(--shop-border);
    border-radius: 50%;
    background: none;
    color: var(--shop-text-dim);
    font-size: 1.4rem;
    cursor: pointer;
}

.rs__close:hover {
    border-color: var(--shop-gold);
    color: var(--shop-gold);
}

.rs__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    flex-shrink: 0;
    padding: 8px 14px;
    border-bottom: 1px solid var(--shop-border);
    color: var(--shop-text-dim);
    font-size: 1.1rem;
}

.rs__legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.rs__legend b {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
}

.rs__legend .lg-o {
    color: var(--accent-geen, #2ecc71);
}

.rs__legend .lg-x {
    color: var(--accent-red, #c52630);
}

.rs__legend .lg-t {
    color: var(--shop-gold);
}

.rs__legend .lg-l {
    color: #5a8dd6;
}

.rs__legend .lg-n {
    color: var(--shop-text-mute);
}

.rs__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
    padding: 8px 14px;
    border-bottom: 1px solid var(--shop-border);
}

.rs__nav button {
    padding: 6px 12px;
    border: 1px solid var(--shop-border);
    border-radius: 999px;
    background: none;
    color: var(--shop-gold-soft);
    background: var(--shop-bg-card);
    font-family: inherit;
    font-size: 1.15rem;
    cursor: pointer;
}

.rs__nav button:hover:not(:disabled) {
    border-color: var(--shop-gold);
    color: var(--shop-gold);
}

.rs__nav button:disabled {
    opacity: .35;
    cursor: default;
}

.rs__range {
    color: var(--shop-text);
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rs__scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.rs__state {
    padding: 44px 16px;
    color: var(--shop-text-dim);
    font-size: 1.3rem;
    text-align: center;
}

.rs__foot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--shop-border);
    background: var(--shop-bg-card-alt);
    color: var(--shop-text-dim);
    font-size: 1.15rem;
}

.rs__more {
    margin-left: auto;
    flex-shrink: 0;
    padding: 8px 14px;
    border: 1px solid var(--shop-gold-dim);
    border-radius: 999px;
    color: var(--shop-gold);
    font-size: 1.2rem;
    white-space: nowrap;
}

.rs__more:hover {
    border-color: var(--shop-gold);
    background: rgba(201, 168, 108, .08);
}

/* ─────────────────────────────
   週グリッド
   ───────────────────────────── */
.rs-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-variant-numeric: tabular-nums;
}

.rs-grid th,
.rs-grid td {
    border: 1px solid var(--shop-border);
    text-align: center;
}

.rs-grid thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 7px 2px;
    sbackground: var(--shop-bg-card);
    color: var(--shop-text);
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.25;
}

.rs-grid thead th small {
    display: block;
    color: var(--shop-text-mute);
    font-size: .95rem;
    margin-top: 2px;
    font-weight: 400;
}

.rs-grid thead th.is-sun {
    color: #e26a6a;
}

.rs-grid thead th.is-sat {
    color: #8fb0e0;
}

.rs-grid thead th .rs-note {
    display: block;
    color: #ff8a93;
    font-size: .9rem;
    font-weight: 400;
    line-height: 1.3;
}

.rs-grid .rs-t {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 52px;
    background: var(--shop-bg-card-alt);
    color: var(--shop-text-dim);
    font-size: 1.1rem;
    font-weight: 500;
}

.rs-grid thead .rs-t {
    z-index: 4;
}

.rs-grid td {
    height: 34px;
    padding: 0;
}

.rs-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
}

.rs-o {
    background: rgba(46, 204, 113, .1);
    color: var(--accent-geen, #2ecc71);
    font-weight: 700;
}

.rs-o:hover {
    background: rgba(46, 204, 113, .25);
}

.rs-x {
    background: rgba(197, 38, 48, .06);
    color: var(--accent-red, #c52630);
}

.rs-tent {
    color: var(--shop-gold);
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.rs-tel {
    color: #5a8dd6;
    font-size: 1.1rem;
    font-weight: 700;
}

.rs-off {
    color: var(--shop-text-mute);
}

.rs-past {
    background: #08080a;
    color: #3a3a40;
}

/* ─────────────────────────────
   SP = ボトムシート
   ───────────────────────────── */
@media (max-width: 700px) {
    .rs__panel {
        top: auto;
        left: 0;
        bottom: 0;
        transform: none;
        width: 100%;
        max-height: 90vh;
        border-bottom: 0;
        border-radius: 14px 14px 0 0;
        animation: rs-up .26s cubic-bezier(.2, 1, .3, 1);
    }

    @keyframes rs-up {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    .rs__range {
        font-size: 1.2rem;
    }
    .rs__panel::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .25);
        transform: translateX(-50%);
    }
    .rs__legend {
        font-size: 1rem;
    }
    .rs__head {
        padding-top: 16px;
    }

    .rs-grid .rs-t {
        width: 44px;
        font-size: 1rem;
    }

    .rs-grid td {
        height: 32px;
    }

    .rs-cell {
        font-size: 1.25rem;
    }

    .rs__more {
        padding: 8px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs__ov,
    .rs__panel {
        animation: none;
    }
}
.rs-nolink {
    pointer-events: none;
    cursor: default;
    opacity: 0.6;
    filter: grayscale(1);
}