/* =========================================
	Event Calendar
	デザイン：Figma「豊岡市民プラザ_デザイン」
	イベントカレンダー_PC 462:13995 / SP 503:10494（PC 1366px・SP 400px 基準）
	月のカレンダーは FullCalendar の出力をCSSでデザインに寄せている（マスの中身は calendar.js の eventContent）
	吹き出し（PC）と1日1行のリスト（SP）は calendar.js で作っている
========================================= */
.c-evcal-box,
.c-evcal-month {
	--evcal_sat: var(--c_blue);
	--evcal_sun: #ea6a6a;
	--evcal_border: #e6e6e6;
	--evcal_head: #f7f7f7;
	--evcal_tx_sub: #666;
	--evcal_today: rgba(69, 202, 255, .12);   /* 今日のマス（--c_blue を薄く） */
}

/* ----------------------------------------
	カレンダーの白いカード
---------------------------------------- */
.c-evcal-box {
	margin-top: var(--num80);
	padding: 32px 30px 30px;
	background: #fff;
	border-radius: 10px;
}

.c-evcal-calendar {
	position: relative;
	width: 100%;
}

.c-evcal-note {
	margin-top: 22px;
	font-size: var(--fz12);
	color: #888;
}

/* ----------------------------------------
	上部（< 2026年10月 > 今月）
	ボタンの塊を display: contents でほどき、order で並べ替えている
---------------------------------------- */
.c-evcal-calendar .fc .fc-header-toolbar {
	justify-content: flex-start;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}
.c-evcal-calendar .fc .fc-toolbar-chunk,
.c-evcal-calendar .fc .fc-button-group {
	display: contents;
}
.c-evcal-calendar .fc .fc-prev-button  { order: 1; }
.c-evcal-calendar .fc .fc-toolbar-title { order: 2; }
.c-evcal-calendar .fc .fc-next-button  { order: 3; }
.c-evcal-calendar .fc .fc-today-button { order: 4; }

.c-evcal-calendar .fc .fc-toolbar-title {
	font-size: var(--fz30);
	font-weight: 700;
	line-height: 1.3;
}
.c-evcal-calendar .fc .fc-button,
.c-evcal-calendar .fc .fc-button-group > .fc-button {
	flex: none;
	padding: 0;
	color: var(--c_black);
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
}
.c-evcal-calendar .fc .fc-button:focus,
.c-evcal-calendar .fc .fc-button:active,
.c-evcal-calendar .fc .fc-button-primary:not(:disabled):active,
.c-evcal-calendar .fc .fc-button-primary:not(:disabled):hover {
	color: var(--c_black);
	background: none;
	box-shadow: none;
}
.c-evcal-calendar .fc .fc-prev-button,
.c-evcal-calendar .fc .fc-next-button {
	width: 24px;
	height: 24px;
	margin: 0;
}
.c-evcal-calendar .fc .fc-icon {
	font-size: 22px;
}
.c-evcal-calendar .fc .fc-today-button {
	margin-left: 0;
	padding: 3px 13px;
	font-size: var(--fz12);
	line-height: 1.5;
	border: 1px solid var(--c_black);
	border-radius: 5px;
}
.c-evcal-calendar .fc .fc-today-button:disabled {
	opacity: .4;
}

/* ----------------------------------------
	月表示
---------------------------------------- */
.c-evcal-calendar .fc-theme-standard .fc-scrollgrid {
	border: 1px solid var(--evcal_border);
	border-radius: 10px;
	overflow: hidden;
}
.c-evcal-calendar .fc-theme-standard td,
.c-evcal-calendar .fc-theme-standard th {
	border-color: var(--evcal_border);
}

/* 曜日 */
.c-evcal-calendar .fc .fc-col-header-cell {
	background: var(--evcal_head);
}
.c-evcal-calendar .fc .fc-col-header-cell-cushion {
	display: block;
	padding: 12px 0;
	font-size: var(--fz13);
	text-align: center;
	font-weight: 600;
	color: #333;
}
.c-evcal-calendar .fc .fc-day-sat .fc-col-header-cell-cushion { color: var(--evcal_sat); }
.c-evcal-calendar .fc .fc-day-sun .fc-col-header-cell-cushion { color: var(--evcal_sun); }

/* 日付セル */
.c-evcal-calendar .fc .fc-daygrid-day-frame {
	min-height: 90px;
	padding: 10px 8px;
}
.c-evcal-calendar .fc .fc-daygrid-day-top {
	flex-direction: row;
}
.c-evcal-calendar .fc .fc-daygrid-day-number {
	padding: 0;
	font-size: var(--fz14);
	font-weight: 600;
	line-height: 1.2;
	color: var(--c_black);
}
.c-evcal-calendar .fc .fc-day-sat .fc-daygrid-day-number { color: var(--evcal_sat); }
.c-evcal-calendar .fc .fc-day-sun .fc-daygrid-day-number { color: var(--evcal_sun); }
.c-evcal-calendar .fc .fc-daygrid-day.is-holiday .fc-daygrid-day-number { color: var(--evcal_sun); } /* 祝日 */

/* 前後の月の日 */
.c-evcal-calendar .fc .fc-day-other {
	background: var(--c_bg);
}
.c-evcal-calendar .fc .fc-day-other .fc-daygrid-day-top {
	opacity: 1;
}
.c-evcal-calendar .fc .fc-day-other .fc-daygrid-day-number {
	font-weight: 400;
	color: #999;
}

/* 今日（デザインに指定はないが、マス全体を薄い青にする） */
.c-evcal-calendar .fc .fc-day-today {
	background: var(--evcal_today);
}
.c-evcal-calendar .fc .fc-day-today.fc-day-other {
	background: var(--c_bg);
}

/* イベント（calendar.js が1日ずつに分けて「タグ＋イベント名」を出す。帯の色は付けない） */
.c-evcal-calendar .fc .fc-daygrid-day-events {
	margin-top: 4px;
}
.c-evcal-calendar .fc .fc-daygrid-event-harness + .fc-daygrid-event-harness {
	margin-top: 10px;
}
.c-evcal-calendar .fc .fc-daygrid-event {
	margin: 0;
	padding: 0;
	color: #333;
	background: none;
	border: none;
	border-radius: 0;
}
.c-evcal-calendar .fc .fc-daygrid-event:hover {
	background: none;
	opacity: .7;
}
.c-evcal-cell {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	min-width: 0;
}
.c-evcal-cell__cat {
	max-width: 100%;
	padding: 2px 10px;
	font-size: 10px;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-radius: 10px;
}
.c-evcal-cell__title {
	font-size: var(--fz12);
	font-weight: 600;
	line-height: 1.3;
	color: #333;
	white-space: normal;
	word-break: break-all;
}
.c-evcal-calendar .fc .fc-daygrid-more-link {
	font-size: var(--fz12);
}

/* ----------------------------------------
	吹き出し（PC：イベントにマウスを乗せたとき）
	位置と三角の横位置（--evcal_tip_arrow）は calendar.js が付ける
---------------------------------------- */
.c-evcal-tip {
	position: absolute;
	z-index: 1000;
	top: 0;
	left: 0;
	width: 236px;
	padding: 20px;
	background: #fff;
	border-radius: 10px;
	filter: drop-shadow(0 1px 3.5px rgba(0, 0, 0, .25));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s, visibility .15s;
}
.c-evcal-tip.is-show {
	opacity: 1;
	visibility: visible;
}
.c-evcal-tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: var(--evcal_tip_arrow, 50%);
	border-top: 14px solid #fff;
	border-right: 10px solid transparent;
	border-left: 10px solid transparent;
	transform: translateX(-50%);
}
.c-evcal-tip.is-below::after {
	top: auto;
	bottom: 100%;
	border-top: none;
	border-bottom: 14px solid #fff;
}
.c-evcal-tip__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}
.c-evcal-tip__date {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.c-evcal-tip__day {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
}
.c-evcal-tip__date.is-sat .c-evcal-tip__day { color: var(--c_blue); }
.c-evcal-tip__date.is-sun .c-evcal-tip__day,
.c-evcal-tip__date.is-holiday .c-evcal-tip__day { color: #ea6a6a; }
.c-evcal-tip__week {
	font-size: 11px;
	line-height: 1.2;
	color: #888;
}
.c-evcal-tip__cat {
	flex: none;
	margin-top: 10px;
	padding: 3px 8px;
	font-size: 10px;
	line-height: 1.2;
	white-space: nowrap;
	border-radius: 12px;
}
.c-evcal-tip__title {
	margin-top: 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}
.c-evcal-tip__excerpt {
	display: -webkit-box;
	margin-top: 8px;
	font-size: 12px;
	line-height: 20px;
	color: #555;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

/* 1日1行のリスト（SP）。PCでは出さない */
.c-evcal-days {
	display: none;
}

/* ----------------------------------------
	月別イベント一覧（カード）
	見出しは calendar.js が「○年○月のイベント一覧」を入れる
---------------------------------------- */
.c-evcal-month {
	margin-top: var(--num100);
}
.c-evcal-month__ttl {
	font-size: var(--fz21);
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}
.c-evcal-month-list__items {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	align-items: stretch;
	gap: 22px;
	margin-top: 40px;
	list-style: none;
}
.c-evcal-month-list__empty {
	grid-column: 1 / -1;
	text-align: center;
}
.c-evcal-month-list__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 200px;
	padding: 20px 20px 18px;
	color: var(--c_black);
	background: #fff;
	border-radius: 10px;
	transition: box-shadow .2s;
}
.c-evcal-month-list__link:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

/* 矢印（黒丸） */
.c-evcal-month-list__link::after {
	content: "";
	display: block;
	align-self: flex-end;
	flex-shrink: 0;
	width: 26px;
	height: 26px;
	margin-top: auto;
	background: url(../../img/arrow_black18.svg) no-repeat center / contain;
}

.c-evcal-month-list__date {
	font-size: var(--fz14);
	font-weight: 600;
	line-height: 1.4;
}
.c-evcal-month-list__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 10px;
}
.c-evcal-month-list__category,
.c-evcal-month-list__status {
	display: inline-block;
	padding: 1px 8px;
	font-size: var(--fz11);
	font-weight: 400;
	line-height: 1.5;
	white-space: nowrap;
	border-radius: 10px;
}
.c-evcal-month-list__status {
	color: var(--c_black);
	background: #d4d4d4;
}
.c-evcal-month-list__status.is-open     { background: var(--c_blue); }               /* 応募受付中 */
.c-evcal-month-list__status.is-before   { background: #8fdde0; }                     /* 受付前 */
.c-evcal-month-list__status.is-running  { color: #fff; background: var(--c_black); } /* 開催中 */
.c-evcal-month-list__status.is-upcoming { padding: 0 7px; background: #fff; border: 1px solid var(--c_black); } /* 開催予定 */
.c-evcal-month-list__status.is-finished,
.c-evcal-month-list__status.is-end      { background: #d4d4d4; }                     /* 開催終了・受付終了 */

.c-evcal-month-list__title {
	margin-top: 12px;
	font-size: var(--fz16);
	font-weight: 700;
	line-height: 1.4;
}
.c-evcal-month-list__excerpt {
	display: -webkit-box;
	margin: 10px 0 14px;
	font-size: var(--fz13);
	line-height: 1.5;
	color: #555;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

/* =========================================
	1024px以下（タブレット）
========================================= */
@media only screen and (max-width: 1024px) {
	.c-evcal-month-list__items {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* =========================================
	768px以下（スマホ）
	月のカレンダー（マス目）は隠し、calendar.js が作る1日1行のリストを出す
========================================= */
@media only screen and (max-width: 768px) {
	.c-evcal-box {
		padding: 0;
		background: none;
		border-radius: 0;
	}
	.c-evcal-note {
		margin-top: 14px;
	}

	/* 上部（< 2026年 9月 > 今月）は白い帯 */
	.c-evcal-calendar .fc .fc-header-toolbar {
		justify-content: center;
		gap: 12px;
		margin-bottom: 0;
		padding: 16px;
		background: #fff;
		border-radius: 10px 10px 0 0;
	}
	.c-evcal-calendar .fc .fc-toolbar-title {
		font-size: 22px;
		font-weight: 600;
	}
	.c-evcal-calendar .fc .fc-today-button {
		padding: 5px 12px;
		font-size: 13px;
		border-radius: 6px;
	}
	.c-evcal-calendar .fc .fc-view-harness {
		display: none;
	}

	/* 1日1行のリスト */
	.c-evcal-days {
		display: block;
		list-style: none;
		background: #fff;
		border-top: 1px solid #e5e7eb;
		border-radius: 0 0 10px 10px;
		overflow: hidden;
	}
	.c-evcal-days__row {
		display: flex;
		border-bottom: 1px solid #e5e7eb;
	}
	.c-evcal-days__row:last-child {
		border-bottom: none;
	}
	.c-evcal-days__date {
		display: flex;
		flex: none;
		justify-content: center;
		align-items: baseline;
		gap: 4px;
		width: 68px;
		padding: 8px;
		background: #f9f9f9;
	}
	.c-evcal-days__row.has-event .c-evcal-days__date {
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.c-evcal-days__num {
		font-size: 22px;
		font-weight: 600;
		line-height: 1.2;
	}
	.c-evcal-days__week {
		font-size: 11px;
		line-height: 1.2;
		color: #666;
	}
	.c-evcal-days__row.is-today .c-evcal-days__date,
	.c-evcal-days__row.is-today .c-evcal-days__events {
		background: var(--evcal_today);
	}
	.c-evcal-days__row.is-sat .c-evcal-days__num { color: var(--evcal_sat); }
	.c-evcal-days__row.is-sun .c-evcal-days__num,
	.c-evcal-days__row.is-holiday .c-evcal-days__num { color: var(--evcal_sun); }

	.c-evcal-days__events {
		flex: 1;
		min-width: 0;
		padding: 0 12px;
	}
	.c-evcal-days__event {
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 20px 0;
		color: var(--c_black);
	}
	.c-evcal-days__event + .c-evcal-days__event {
		padding-top: 0;
	}

	/* 矢印（黒丸） */
	.c-evcal-days__event::after {
		content: "";
		flex: none;
		width: 28px;
		height: 28px;
		background: url(../../img/arrow_black18.svg) no-repeat center / contain;
	}
	.c-evcal-days__text {
		display: flex;
		flex: 1;
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		min-width: 0;
	}
	.c-evcal-days__cat {
		padding: 2px 8px;
		font-size: 10px;
		line-height: 1.2;
		white-space: nowrap;
		border-radius: 10px;
	}
	.c-evcal-days__title {
		margin-top: 2px;
		font-size: 16px;
		font-weight: 600;
		line-height: 1.2;
	}
	.c-evcal-days__excerpt {
		width: 100%;
		font-size: 12px;
		line-height: 20px;
		color: #555;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.c-evcal-month-list__items {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-top: 24px;
	}
	.c-evcal-month-list__link {
		min-height: 0;
		padding: 18px 18px 16px;
	}
	.c-evcal-month-list__excerpt {
		-webkit-line-clamp: 2;
	}
}
