@charset "UTF-8";

/**
 * お店用営業カレンダー スタイルシート (shop-calendar.css)
 * あとからデザイン調整しやすいよう、フラットでシンプルな構造にしています。
 */

/* =========================================================
   1. カレンダー全体の枠組み・レイアウト
========================================================= */
.shop-calendar {
	--sc-cell-bg: #ffffff;
	--sc-cell-text: #333333;
	max-width: 900px;
	margin: 20px auto 20px;
	font-family: sans-serif;
}

.shop-calendar[data-display-months="3"] {
	max-width: 1140px;
}

/* 月送りボタン（両端配置：＜ ………… ＞） */
.shop-calendar__controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	margin-bottom: -26px;
	position: relative;
	z-index: 1;
}

.shop-calendar__btn {
	/* width: 36px; */
	/* height: 36px; */
	/* border: 1px solid #ccc; */
	background: transparent;
	border: none;
	/* font-weight: normal; */
	color: #666;
	/* border-radius: 4px; */
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	transition: opacity 0.2s, background-color 0.2s;
}

/*
.shop-calendar__btn:hover:not(:disabled) {
	background: #f5f5f5;
}
*/

.shop-calendar__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

/* 月ブロックの並び（1ヶ月表示 / 2ヶ月表示 / 3ヶ月表示） */
.shop-calendar__months {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

/* 2ヶ月表示が選択されている場合（PC・タブレットで横並び） */
.shop-calendar[data-display-months="2"] .shop-calendar__months {
	grid-template-columns: repeat(2, 1fr);
}

/* 3ヶ月表示が選択されている場合（PC・タブレットで横並び） */
.shop-calendar[data-display-months="3"] .shop-calendar__months {
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

/* スマホ表示（767px以下）は1ヶ月表示のみ */
@media (max-width: 767px) {
	.shop-calendar[data-display-months="2"] .shop-calendar__months,
	.shop-calendar[data-display-months="3"] .shop-calendar__months {
		grid-template-columns: 1fr;
	}

	/* JS実行前の初期描画でも1ヶ月分のみ表示してチラつきを防ぐ */
	.shop-calendar:not(.is-js-ready) .shop-calendar__month.is-visible ~ .shop-calendar__month.is-visible {
		display: none;
	}
}

/* 表示対象外の月は非表示 */
.shop-calendar__month {
	display: none;
}

.shop-calendar__month.is-visible {
	display: block;
}

/* 年月タイトル */
.shop-calendar__title {
	margin: 0 0 6px !important;
	font-size: 16px;
	font-weight: normal;
	text-align: center;
}
.shop-calendar__title::before {content:none !important;}


/* =========================================================
   2. カレンダーテーブル・日付セル
========================================================= */
.shop-calendar__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.shop-calendar__table th,
.shop-calendar__table td {
	border: 1px solid #ddd;
	padding: 1px 4px;
	text-align: center;
	vertical-align: middle;
}

.shop-calendar[data-display-months="3"] .shop-calendar__table th,
.shop-calendar[data-display-months="3"] .shop-calendar__table td {
	padding: 8px 2px;
}

@media (max-width: 767px) {
	.shop-calendar[data-display-months="3"] .shop-calendar__table th,
	.shop-calendar[data-display-months="3"] .shop-calendar__table td {
		padding: 10px 4px;
	}
}

.shop-calendar__table th {
	background-color: #f7f7f7;
	background-color: color-mix(in srgb, var(--sc-cell-bg, #ffffff) 92%, #808080);
	color: var(--sc-cell-text, #333333);
	font-size: 13px;
	font-weight: 600;
}

/* 通常日セル（背景カラー・標準文字色を反映） */
.shop-calendar .cal-day {
	background-color: var(--sc-cell-bg, #ffffff);
	color: var(--sc-cell-text, #333333);
	font-size: 14px;
}

.shop-calendar .cal-day.is-empty {
	background-color: #fafafa;
	background-color: color-mix(in srgb, var(--sc-cell-bg, #ffffff) 96%, #808080);
}

/* 日曜・土曜の文字色（何もない日は赤・青を維持） */
.shop-calendar .cal-dow.cal-dow--sun,
.shop-calendar .cal-day.cal-dow--sun {
	color: #d93025;
}

.shop-calendar .cal-dow.cal-dow--sat,
.shop-calendar .cal-day.cal-dow--sat {
	color: #1a73e8;
}

.cal-day__num {
	display: inline-block;
	line-height: 1.4;
}

/* =========================================================
   3. 当日クラス (.is-today) と 初期ステータスのフォールバック色
   ※管理画面で設定したカラーはインラインCSSで個別に上書き出力されます
========================================================= */

/* 当日 (.is-today) */
.shop-calendar .cal-day.is-today,
.shop-calendar .shop-calendar__swatch.is-today {
	outline: 3px solid var(--sc-cell-text, #333333);
	outline-offset: -2px;
	font-weight: 700;
}

.shop-calendar .is-today{outline-color:#ffaf4c !important;}


/* 初期6項目のフォールバック定義 */
.shop-calendar .cal-day.cal-status-1,
.shop-calendar .shop-calendar__swatch.cal-status-1 {
	background-color: #fde8e8;
	color: #b91c1c;
}

.shop-calendar .cal-day.cal-status-2,
.shop-calendar .shop-calendar__swatch.cal-status-2 {
	background-color: #fef3c7;
	color: #92400e;
}

.shop-calendar .cal-day.cal-status-3,
.shop-calendar .shop-calendar__swatch.cal-status-3 {
	background-color: #e0f2fe;
	color: #075985;
}

.shop-calendar .cal-day.cal-status-4,
.shop-calendar .shop-calendar__swatch.cal-status-4 {
	background-color: #ede9fe;
	color: #5b21b6;
}

.shop-calendar .cal-day.cal-status-5,
.shop-calendar .shop-calendar__swatch.cal-status-5 {
	background-color: #dcfce7;
	color: #166534;
}

.shop-calendar .cal-day.cal-status-6,
.shop-calendar .shop-calendar__swatch.cal-status-6 {
	background-color: #f3f4f6;
	color: #374151;
}

/* =========================================================
   4. 凡例リスト
========================================================= */
.shop-calendar__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	list-style: none;
	margin: 16px 0 0;
	padding: 0;
	font-size: 13px;
}

.shop-calendar__legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.shop-calendar__swatch {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 1px solid #ddd;
	border-radius: 3px;
	background-color: var(--sc-cell-bg, #ffffff);
}
