@charset "utf-8";

/*
 * LP 予約カレンダー / 時間枠選択
 *
 * 移植元:
 *   - common/css/index.css  (.reserve-main .reserve .calendar-container 配下)
 *   - resources/views/index.blade.php  (チャコール #3a3a3a / ピンク #e85298 の配色上書き)
 *
 * 予約ページ側は `.reserve-main .reserve` に依存したセレクタだが、LP には
 * その祖先が存在しないため `.lprc` スコープへ書き換えている。
 * 配色は index.blade.php で最終的に適用されている値（ベース = チャコール、
 * 選択・残りわずか = ピンク）を直接ハードコードし、!important 合戦を避けた。
 */

.lprc {
    --lprc-base: #3a3a3a;
    --lprc-accent: #e85298;
    --lprc-muted: #c9c9c9;
    --lprc-border: #d0d0d0;
    --lprc-line: #d5d7dc;

    margin: 0 0 10px;
    text-align: left;
}

.lprc__lead {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

/* ---------------------------------------------------------------
 * CF7 の必須バリデーションを効かせるための代理 input。
 * 値はカレンダー側の JS がセットするため、入力欄自体は見せない。
 * display:none にすると一部ブラウザでフォーカス移動時に例外が出るので、
 * 画面外へ逃がす方式にしている。
 * --------------------------------------------------------------- */
.lprc-proxy {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    border: 0 !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* 選択済みの日時サマリ */
.lprc__selected {
    margin: 10px 0 0;
    font-size: 15px;
    font-weight: bold;
    color: var(--lprc-base);
    min-height: 1.4em;
}

.lprc__selected.is-empty {
    color: #999;
    font-weight: normal;
}

/* ---------------------------------------------------------------
 * カレンダー本体
 * --------------------------------------------------------------- */
.lprc__container {
    position: relative;
    margin: 0 auto;
    border: 1px solid var(--lprc-border);
    border-radius: 5px;
    background: #fff;
}

.lprc__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 5px;
}

.lprc__overlay.is-show {
    display: flex;
}

.lprc__spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid var(--lprc-base);
    border-radius: 50%;
    animation: lprc-spin 1s linear infinite;
}

@keyframes lprc-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.lprc__month {
    display: flex;
    align-items: center;
    padding: 12px 10px 6px;
}

.lprc__month #lprc-title {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: var(--lprc-base);
}

.lprc__empty {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 24px 10px;
    margin: 0;
}

.lprc__legend {
    padding-right: 20px;
    text-align: right;
    font-size: 12px;
    color: #666;
    margin: 0 0 10px;
}

/* ---------------------------------------------------------------
 * 日付テーブル
 * --------------------------------------------------------------- */
.lprc table#lprc-table {
    display: table;
    width: 95%;
    margin: 0 auto 15px;
    text-align: center;
    box-sizing: border-box;
    border-collapse: collapse;
    border-top: none;
    /* 曜日ヘッダーと日付セルの列幅を必ず一致させる（自動幅だとテーマ側の
       th パディングで曜日だけ列からずれる） */
    table-layout: fixed;
}

.lprc table#lprc-table thead {
    font-size: 14px;
    font-weight: bold;
    color: var(--lprc-base);
}

/* ---------------------------------------------------------------
 * テーマのレスポンシブ用リセット対策。
 * 設置先テーマが table / tr / th を display:block 化 + 左寄せ（!important 付き）
 * するため、テーブル構造を丸ごと強制的に復元する。tr がブロックのままだと
 * 行間に margin 由来の隙間が出てガタつく。
 * --------------------------------------------------------------- */
.lprc table#lprc-table,
.lprc table#lprc-time.is-show {
    display: table !important;
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.lprc table#lprc-table thead,
.lprc table#lprc-time thead {
    display: table-header-group !important;
}

.lprc table#lprc-table tbody,
.lprc table#lprc-time tbody {
    display: table-row-group !important;
}

.lprc table#lprc-table tr,
.lprc table#lprc-time tr {
    display: table-row !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0;
}

.lprc table#lprc-table th,
.lprc table#lprc-table td,
.lprc table#lprc-time th,
.lprc table#lprc-time td {
    display: table-cell !important;
    float: none !important;
    margin: 0 !important;
    border-radius: 0;
}

/* th 直下に噛ませる内側ラッパー。テーマがどれだけ強い詳細度で
 * th の text-align を上書きしても、子ブロックへの直接指定には勝てない */
.lprc .lprc-th-in {
    display: block;
    width: 100%;
    margin: 0;
    text-align: center !important;
}

.lprc table#lprc-table th {
    width: 14.2857%;
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: bold;
    padding: 8px 2px !important;
}

.lprc table#lprc-table td {
    width: 14.2857%;
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: bold;
    border: 1px solid #e0e0e0;
    padding: 0 !important;
}

.lprc table#lprc-table td.available {
    cursor: pointer;
}

.lprc table#lprc-table td div.date {
    vertical-align: middle;
    background-color: var(--lprc-base);
    color: #ffffff;
    text-align: center;
    margin: 0 auto;
    font-size: 13px;
    padding: 2px 0;
}

/* 高さは line-height で固定する。記号ごとに font-size を変えても
   セルの高さが揃い、行ごとのガタつきが出ないようにするため */
.lprc table#lprc-table td div.canReserve {
    font-size: 20px;
    height: 38px;
    line-height: 38px;
    position: relative;
    padding: 0;
    color: var(--lprc-base);
    text-align: center;
    margin: 0 auto;
}

/* ○ と × は △ よりグリフが小さく描かれるフォントが多いため、記号ごとに補正する。
   高さは親の line-height で固定済みなので font-size を上げてもレイアウトは崩れない */
.lprc table#lprc-table td div.canReserve.is-circle {
    font-size: 32px;
}

.lprc table#lprc-table td div.canReserve.is-cross {
    font-size: 32px;
}

.lprc table#lprc-table td div.canReserve.is-triangle {
    font-size: 21px;
}

/* 空きなし */
.lprc table#lprc-table td.notFree div.date {
    background-color: var(--lprc-muted);
    color: #fff;
}

.lprc table#lprc-table td.notFree div.canReserve {
    color: var(--lprc-muted);
}

/* 残りわずか */
.lprc table#lprc-table td.limited div.canReserve {
    color: var(--lprc-accent);
}

/* 選択中 */
.lprc table#lprc-table td.selected {
    background: #ffffff;
}

.lprc table#lprc-table td.selected div.date {
    color: #ffffff;
    background-color: var(--lprc-accent);
}

.lprc table#lprc-table td.selected div.canReserve {
    color: var(--lprc-accent);
}

/* ---------------------------------------------------------------
 * 時間枠テーブル
 * --------------------------------------------------------------- */
.lprc table#lprc-time {
    display: none;
    width: 95%;
    margin: 0 auto 15px;
    text-align: center;
    border-collapse: collapse;
    table-layout: fixed;
}

.lprc table#lprc-time.is-show {
    display: table;
}

.lprc table#lprc-time tr.available {
    cursor: pointer;
}

.lprc table#lprc-time th {
    width: 35%;
    font-weight: bold;
    line-height: 36px;
    border-bottom: 1px solid var(--lprc-line);
    background-color: var(--lprc-base);
    color: #ffffff;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 5px !important;
}

/* ○× は line-height を固定し、行ごとに高さがぶれないようにする */
.lprc table#lprc-time td {
    padding: 5px 20px !important;
    font-size: 28px;
    line-height: 36px;
    color: var(--lprc-base);
    border: 1px solid var(--lprc-line);
    text-align: center !important;
    vertical-align: middle !important;
}

.lprc table#lprc-time tr.notFree th {
    background: #ddd;
    color: #fff;
}

.lprc table#lprc-time tr.notFree td {
    color: #ddd;
}

/* 選択時は th / td 両方をアクセント色で塗り、○ を白の太字で見せる */
.lprc table#lprc-time tr.selected th,
.lprc table#lprc-time tr.selected td {
    background: var(--lprc-accent);
    color: #ffffff;
    border-color: var(--lprc-accent);
}

.lprc table#lprc-time tr.selected td {
    border-left: 1px solid var(--lprc-line);
    font-weight: 900;
    /* ○ は記号文字なので font-weight では太くならない → 輪郭で太らせる */
    -webkit-text-stroke: 0.7px #ffffff;
}

/* ---------------------------------------------------------------
 * スマホのタップ時ハイライト / 文字選択を抑制。
 * tr だけだと iOS Safari が子要素にハイライトを付けるため全要素に効かせる。
 * --------------------------------------------------------------- */
.lprc table#lprc-table,
.lprc table#lprc-table tr,
.lprc table#lprc-table th,
.lprc table#lprc-table td,
.lprc table#lprc-table td div,
.lprc table#lprc-time,
.lprc table#lprc-time tr,
.lprc table#lprc-time th,
.lprc table#lprc-time td {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 送信ボタンへ誘導するハイライト */
.lprc-highlight-pulse {
    animation: lprc-pulse 1s ease-in-out 2;
}

@keyframes lprc-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(232, 82, 152, 0);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(232, 82, 152, 0.35);
    }
}

@media screen and (max-width: 767px) {
    .lprc table#lprc-table thead {
        font-size: 12px;
    }

    .lprc table#lprc-table th {
        padding: 6px 1px !important;
    }

    .lprc table#lprc-table td div.date {
        font-size: 12px;
        line-height: 25px;
    }

    .lprc table#lprc-table td div.canReserve {
        font-size: 17px;
        height: 32px;
        line-height: 32px;
    }

    .lprc table#lprc-table td div.canReserve.is-circle {
        font-size: 26px;
    }

    .lprc table#lprc-table td div.canReserve.is-cross {
        font-size: 26px;
    }

    .lprc table#lprc-table td div.canReserve.is-triangle {
        font-size: 18px;
    }

    .lprc__month #lprc-title {
        font-size: 14px;
    }

    .lprc table#lprc-time th {
        line-height: 30px;
    }

    .lprc table#lprc-time td {
        padding: 5px 10px !important;
        font-size: 24px;
        line-height: 30px;
    }
}
