/* ===== act_reserve_core 共通カレンダーCSS ===== */

/* ラッパー */
.acrsl-cal-wrap {
    font-family: inherit;
    max-width: 560px;
    margin: 0 auto;
}

/* アカウント名（カレンダー上部） */
.acrsl-cal-account-name {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
}

/* ヘッダー（月ナビ） */
.acrsl-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.acrsl-cal-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}
.acrsl-cal-nav {
    background: none;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.acrsl-cal-nav:hover { background: rgba(0,0,0,.05); }
.acrsl-cal-nav:disabled { opacity: .4; cursor: default; }

/* グリッド */
.acrsl-cal-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.acrsl-cal-grid th {
    font-size: 12px;
    font-weight: normal;
    color: #888;
    padding: 4px 0 8px;
    text-align: center;
}
.acrsl-cal-grid td {
    text-align: center;
    vertical-align: top;
    padding: 4px 2px;
    height: 60px;
    border-radius: 6px;
    position: relative;
}

/* 日付番号 */
.acrsl-cal-day-num {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

/* 状態バッジ */
.acrsl-cal-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    margin-top: 2px;
    line-height: 1.4;
}
.acrsl-state-loading .acrsl-cal-badge {
    background: #eee;
    color: #aaa;
}
.acrsl-state-open .acrsl-cal-badge {
    background: #e8f5e9;
    color: #2e7d32;
}
/* ◎: 全枠空き（予約ゼロ）*/
.acrsl-state-empty .acrsl-cal-badge {
    background: #e3f2fd;
    color: #1565c0;
}
/* △: 残りわずか */
.acrsl-state-low .acrsl-cal-badge {
    background: #fff8e1;
    color: #ef6c00;
}
.acrsl-state-full .acrsl-cal-badge {
    background: #fce4ec;
    color: #c62828;
}
.acrsl-state-closed .acrsl-cal-badge {
    background: #f5f5f5;
    color: #999;
}
/* 休日セル背景 */
.acrsl-state-closed {
    background: rgba(247, 176, 207, 0.14);
}

/* クリック可能（open） */
.acrsl-state-open {
    cursor: pointer;
}
.acrsl-state-open:hover {
    outline: 2px solid rgba(46,125,50,.3);
    outline-offset: -2px;
}

/* 今日 */
.acrsl-cal-today .acrsl-cal-day-num {
    font-weight: bold;
    color: #1565c0;
}

/* 過去日 */
.acrsl-cal-past {
    opacity: .4;
    pointer-events: none;
}

/* 空セル（月境界） */
.acrsl-cal-empty {
    background: transparent;
}

/* 曜日色 */
.acrsl-cal-grid th:first-child,
.acrsl-cal-grid td:first-child { color: #c62828; }
.acrsl-cal-grid th:last-child,
.acrsl-cal-grid td:last-child  { color: #1565c0; }

/* ローディング表示 */
.acrsl-cal-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 12px;
    color: #aaa;
    z-index: 10;
}

/* 範囲外メッセージ（カレンダーグリッド上のオーバーレイ） */
.acrsl-cal-beyond {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 15px;
    color: #555;
    background: rgba(255,255,255,.85);
    border: 1px dashed #ccc;
    border-radius: 8px;
    line-height: 1.8;
    z-index: 10;
    padding: 16px;
}

/* ===== filter_first（v3.37.0）: カレンダー上部の席・メニュー選択 ===== */
.acrsl-cal-filter {
    margin-bottom: 12px;
}
.acrsl-cal-filter-sec + .acrsl-cal-filter-sec {
    margin-top: 12px;
}
.acrsl-cal-filter-title {
    font-size: 13px;
    color: #333;
    margin: 0 0 4px;
}
.acrsl-cal-filter-seats {
    margin-top: 4px;
}
.acrsl-cal-filter-hint {
    font-size: 13px;
    color: #888;
    margin: 4px 0 0;
}
.acrsl-cal-filter-menus {
    border-top: 1px solid rgba(0,0,0,.12);
}
.acrsl-cal-filter-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(0,0,0,.12);
    cursor: pointer;
    font-size: 14px;
}
.acrsl-cal-filter-menu input {
    margin: 0;
}
.acrsl-cal-filter-menu-name {
    flex: 1 1 auto;
    min-width: 0;
}
.acrsl-cal-filter-menu-meta {
    flex: 0 0 auto;
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}
.acrsl-cal-filter-total {
    font-size: 13px;
    color: #333;
    text-align: right;
    margin: 6px 0 0;
}
/* 条件が揃うまでの案内（範囲外メッセージと同じ覆い） */
.acrsl-cal-filter-wait {
    color: #777;
}

/* ===== スロットモーダル（マルチインスタンス対応: id前方一致セレクタ） ===== */
[id^="acrslSlotModalOverlay-"] {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    display: none;
    z-index: 99999;
}
[id^="acrslSlotModal-"] {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 92vw);
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
[id^="acrslSlotModal-"] header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
[id^="acrslSlotModal-"] h3 { margin: 0; font-size: 16px; }
[id^="acrslSlotModal-"] .acrslClose {
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}
[id^="acrslSlotModal-"] .acrslBody { margin-top: 12px; }

/* スロット縦リスト：行ごとに 時間 | 状態（〇/×） */
.acrslSlots {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    border-top: 1px solid rgba(0,0,0,.12);
}
.acrslSlotBtn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,.12);
    background: #fff;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #333;
}
.acrslSlotBtn[disabled] { cursor: not-allowed; color: #888; background: #fafafa; }
.acrslSlotBtn.is-selected {
    background: #eaf3ff;
    outline: 2px solid rgba(70,130,220,.55);
    outline-offset: -2px;
}
/* 時間列：1行で収まる最小幅を確保（4em ≒ "00:00" 分） */
.acrslSlotTime {
    flex: 0 0 auto;
    min-width: 4em;
    white-space: nowrap;
    text-align: left;
}
/* マーク列：残りの幅を占有して中央寄せ */
.acrslSlotMark {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    font-size: 18px;
    line-height: 1;
}
.acrslSlotMark.is-open::before {
    content: "";
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6ea8e6;
}
.acrslSlotMark.is-full {
    color: #999;
    font-weight: bold;
}
/* v3.43.0: 過ぎた時刻・受付締切後の枠（core too_late）。満枠の × ではなく文字で理由を出す */
.acrslSlotMark.is-late {
    color: #aaa;
    font-size: 12px;
}

.acrslSeats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.acrslSeatBtn {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.2);
    background: #fff;
    cursor: pointer;
    user-select: none;
}
.acrslSeatBtn.is-selected {
    outline: 2px solid rgba(0,0,0,.35);
    outline-offset: 1px;
}

/* 選択完了サマリ：選択前デザインを再現 */
.acrslSelectedSummary {
    margin: 4px 0 12px;
}
.acrslSummaryDate {
    font-size: 16px;
    font-weight: bold;
    color: #222;
    margin: 0 0 8px;
}
.acrslSummaryLabel {
    font-size: 13px;
    color: #555;
    margin: 10px 0 6px;
}
/* サマリ内の偽スロット/席はクリック不可だが見た目は維持 */
.acrslSummaryFakeSlots .acrslSlotBtn[disabled],
.acrslSummaryFakeSeats .acrslSeatBtn[disabled] {
    cursor: default;
    color: #333;
    background: #fff;
}
.acrslSummaryFakeSlots .acrslSlotBtn.is-selected[disabled] {
    background: #eaf3ff;
}
.acrslSummaryOneLine {
    margin-top: 12px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
}
.acrslSummaryReset {
    margin-top: 6px;
    padding: 6px 12px;
    font-size: 12px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 6px;
    cursor: pointer;
    color: #444;
}
.acrslSummaryReset:hover { background: #f0f0f0; }

.acrslFooter {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.acrslPrimary {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.2);
    background: #000;
    color: #fff;
    cursor: pointer;
}
.acrslPrimary[disabled] { opacity: .5; cursor: not-allowed; }
.acrslSub { color: #666; font-size: 12px; margin-top: 8px; }

/* 連絡方法 */
.acrslContact {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.10);
}
.acrslContactTitle { font-size: 13px; color: #333; margin: 0 0 8px; }
.acrslContactRow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.acrslToast { font-size: 12px; color: #2e7d32; margin-left: auto; }
.acrslCopyBtn {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.2);
    background: #fff;
    cursor: pointer;
}
.acrslCopyBtn[disabled] { opacity: .45; cursor: not-allowed; }
.acrslContactBtns { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.acrslContactBtn {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.2);
    background: #f7f7f7;
    cursor: pointer;
}
.acrslContactBtn[disabled] { opacity: .45; cursor: not-allowed; }
