/* ==========================================================================
   予約シート（resv-sheet.js）と、ページ内の「空いている日」ボタン
   色は差し色の変数（--wh-accent 等）に乗るので、LPごとの配色に自動で合う
   ========================================================================== */

/* シートを開いている間は後ろのページを動かさない */
html.resv-sheet-open,
html.resv-sheet-open body {
    overflow: hidden;
}

html.resv-sheet-open .sticky-cta {
    display: none;
}

.resv-sheet {
    position: fixed;
    inset: 0;
    z-index: 100050;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.resv-sheet[hidden] {
    display: none;
}

.resv-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 24, 20, 0.55);
    opacity: 0;
    transition: opacity 0.25s var(--wh-ease);
}

.resv-sheet__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 56rem;
    height: calc(100% - 2.4rem);
    height: calc(100dvh - 2.4rem);
    background: #fff;
    border-radius: 1.6rem 1.6rem 0 0;
    box-shadow: 0 -8px 40px rgba(28, 24, 20, 0.25);
    transform: translateY(100%);
    transition: transform 0.26s var(--wh-ease);
    overflow: hidden;
}

.resv-sheet.is-open .resv-sheet__backdrop { opacity: 1; }
.resv-sheet.is-open .resv-sheet__panel { transform: translateY(0); }

@media (min-width: 768px) {
    .resv-sheet { align-items: center; }
    .resv-sheet__panel {
        height: auto;
        max-height: 90vh;
        min-height: 60vh;
        border-radius: 1.6rem;
        transform: translateY(2.4rem);
        opacity: 0;
        transition: transform 0.26s var(--wh-ease), opacity 0.2s var(--wh-ease);
    }
    .resv-sheet.is-open .resv-sheet__panel { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .resv-sheet__backdrop,
    .resv-sheet__panel { transition: none; }
}

.resv-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.2rem 1.2rem 0.8rem 2rem;
}

.resv-sheet__title {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--wh-navy);
    letter-spacing: 0.04em;
}

.resv-sheet__close {
    flex: none;
    width: 4.4rem;
    height: 4.4rem;
    border: 0;
    border-radius: 50%;
    background: #f1eee9;
    color: var(--wh-navy);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
}

.resv-sheet__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin: 0;
    padding: 0 2rem 1.2rem;
    list-style: none;
    border-bottom: 1px solid var(--wh-line);
}

.resv-sheet__step {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    color: #9a9187;
    white-space: nowrap;
}

.resv-sheet__step-no {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e8e3dc;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.resv-sheet__step.is-current { color: var(--wh-navy); font-weight: 700; }
.resv-sheet__step.is-current .resv-sheet__step-no { background: var(--wh-accent); }
.resv-sheet__step.is-done .resv-sheet__step-no { background: var(--wh-navy); }

.resv-sheet__body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
}

/* 1. 日時をえらぶ ------------------------------------------------------- */
.resv-pick {
    padding: 1.6rem 2rem 2.4rem;
}

.resv-pick[hidden] { display: none; }

.resv-pick__event {
    margin: 0 0 1.6rem;
    font-size: 1.3rem;
    line-height: 1.6;
    color: #6b6257;
}

.resv-pick__label {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wh-navy);
}

.resv-pick__dates,
.resv-quick__dates {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.resv-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    justify-content: center;
    min-height: 6.4rem;
    padding: 0.8rem 0.2rem;
    border: 1px solid var(--wh-line);
    border-radius: 0.8rem;
    background: #fff;
    color: var(--wh-navy);
    font: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.resv-date:hover { border-color: var(--wh-accent); }

.resv-date__md { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.resv-date__w { font-size: 1.2rem; }
.resv-date.is-sat .resv-date__w { color: #2f5f9e; }
.resv-date.is-sun .resv-date__w { color: #b3261e; }
.resv-date__free { font-size: 1.1rem; color: var(--wh-accent); font-weight: 600; }

.resv-date.is-selected {
    border-color: var(--wh-accent);
    background: rgba(var(--wh-accent-rgb), 0.08);
    box-shadow: 0 0 0 2px var(--wh-accent) inset;
}

.resv-date.is-full,
.resv-date:disabled {
    background: #f5f3f0;
    color: #b1a99f;
    cursor: default;
    box-shadow: none;
    border-color: transparent;
}

.resv-date.is-full .resv-date__free { color: #b1a99f; }

.resv-pick__empty {
    margin: 0;
    padding: 1.2rem;
    background: #f7f4ef;
    border-radius: 0.8rem;
    font-size: 1.4rem;
    color: #6b6257;
}

.resv-pick__empty[hidden],
.resv-pick__times-wrap[hidden] { display: none; }

.resv-pick__count {
    display: inline-block;
    margin-left: 0.8rem;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    background: rgba(var(--wh-accent-rgb), 0.1);
    color: var(--wh-accent);
    font-size: 1.2rem;
    vertical-align: 0.15em;
}

.resv-pick__times-wrap {
    margin-top: 2.4rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--wh-line);
}

.resv-pick__times {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.resv-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 5.2rem;
    border: 0;
    border-radius: 0.8rem;
    background: var(--wh-accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(var(--wh-accent-rgb), 0.22);
}

.resv-time:hover { background: var(--wh-accent-deep); }
.resv-time__t { font-size: 1.7rem; font-weight: 700; letter-spacing: 0.04em; }
.resv-time__x { font-size: 1.1rem; }

.resv-time.is-full,
.resv-time:disabled {
    background: #efebe6;
    color: #b1a99f;
    box-shadow: none;
    cursor: default;
}

.resv-time.is-full .resv-time__t { text-decoration: line-through; }

.resv-pick__hint {
    margin: 1.2rem 0 0;
    font-size: 1.3rem;
    color: #6b6257;
}

.resv-pick__alt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-top: 2.8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--wh-line);
}

.resv-pick__cal {
    border: 0;
    background: none;
    padding: 0.4rem;
    color: var(--wh-navy);
    font: inherit;
    font-size: 1.4rem;
    text-decoration: underline;
    text-underline-offset: 0.3em;
    cursor: pointer;
}

.resv-pick__tel {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--wh-navy);
    text-decoration: none;
}

/* 2. 入力フォーム（ロカオプ） ------------------------------------------- */
.resv-form[hidden],
.resv-done[hidden] { display: none; }

.resv-form__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 2rem;
    background: #f7f4ef;
}

.resv-form__when {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--wh-navy);
}

.resv-form__change {
    flex: none;
    padding: 0.6rem 1rem;
    border: 1px solid var(--wh-line);
    border-radius: 999px;
    background: #fff;
    color: var(--wh-navy);
    font: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

.resv-form__frame {
    display: block;
    width: 100%;
    min-height: 60vh;
    border: 0;
}

.resv-done {
    padding: 0.8rem 2rem 3.2rem;
    text-align: center;
}

.resv-done__back {
    width: 100%;
    max-width: 32rem;
    padding: 1.4rem;
    border: 1px solid var(--wh-navy);
    border-radius: 0.6rem;
    background: #fff;
    color: var(--wh-navy);
    font: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* ページ内の「空いている日」ボタン ------------------------------------- */
.resv-quick { margin-top: 1.2rem; }

.resv-quick__lead {
    margin: 0 0 1rem;
    font-size: 1.3rem;
    color: #6b6257;
}

.resv-quick--content,
.resv-quick--bottom {
    margin: 0 auto;
    max-width: 56rem;
    padding: 2rem 1.6rem;
    border: 1px solid var(--wh-line);
    border-top: 4px solid var(--wh-accent);
    border-radius: 0.8rem;
    background: #fff;
    text-align: left;
}

.resv-quick--bottom { margin-bottom: 2.4rem; }

.resv-quick__title {
    margin: 0 0 1.2rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--wh-navy);
    text-align: center;
}

.resv-quick__more {
    display: block;
    width: 100%;
    margin-top: 1.2rem;
    padding: 1.3rem;
    border: 0;
    border-radius: 0.6rem;
    background: var(--wh-accent);
    color: #fff;
    font: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.resv-quick__note {
    margin: 1rem 0 0;
    font-size: 1.2rem;
    color: #6b6257;
    text-align: center;
}

.detail-cta[hidden],
.visit-days__list[hidden] { display: none; }
