@charset "UTF-8";

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

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

/* 月送りボタン（＜ ＞） */
.shop-calendar__controls {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 12px;
}

.shop-calendar__btn {
	width: 36px;
	height: 36px;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	border-radius: 4px;
	cursor: pointer;
	font-size: 16px;
	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ヶ月表示） */
.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);
}

@media (max-width: 767px) {
	.shop-calendar[data-display-months="2"] .shop-calendar__months {
		grid-template-columns: 1fr;
	}
}

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

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

/* 年月タイトル */
.shop-calendar__title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
}

/* =========================================================
   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: 10px 4px;
	text-align: center;
	vertical-align: middle;
}

.shop-calendar__table th {
	background-color: #f7f7f7;
	font-size: 13px;
	font-weight: 600;
}

/* 日曜・土曜の文字色 */
.cal-dow--sun {
	color: #d93025;
}

.cal-dow--sat {
	color: #1a73e8;
}

.cal-day {
	background-color: #fff;
	font-size: 14px;
}

.cal-day.is-empty {
	background-color: #fafafa;
}

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

/* =========================================================
   3. 当日クラス (.is-today) と 6項目の色分けクラス (.cal-status-1 〜 6)
   ※ここの色や枠線を変更するだけで、カレンダーと凡例の両方に反映されます
========================================================= */

/* 当日 (.is-today) */
.cal-day.is-today,
.shop-calendar__swatch.is-today {
	outline: 2px solid #333;
	outline-offset: -2px;
	font-weight: 700;
}

/* 項目1：定休日 (.cal-status-1) ※曜日チェックボックスの定休日にも付与されます */
.cal-day.cal-status-1,
.shop-calendar__swatch.cal-status-1 {
	background-color: #fde8e8;
	color: #b91c1c;
}

/* 項目2：臨時休業 (.cal-status-2) */
.cal-day.cal-status-2,
.shop-calendar__swatch.cal-status-2 {
	background-color: #fef3c7;
	color: #92400e;
}

/* 項目3：午前のみ営業 (.cal-status-3) */
.cal-day.cal-status-3,
.shop-calendar__swatch.cal-status-3 {
	background-color: #e0f2fe;
	color: #075985;
}

/* 項目4：午後のみ営業 (.cal-status-4) */
.cal-day.cal-status-4,
.shop-calendar__swatch.cal-status-4 {
	background-color: #ede9fe;
	color: #5b21b6;
}

/* 項目5：イベント・特別営業 (.cal-status-5) */
.cal-day.cal-status-5,
.shop-calendar__swatch.cal-status-5 {
	background-color: #dcfce7;
	color: #166534;
}

/* 項目6：通常営業・定休日解除 (.cal-status-6) */
.cal-day.cal-status-6,
.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: #fff;
}
