/**
 * 説明会・イベントページの開催日程、カレンダー、日付カードの基底表示を管理する。
 *
 * 日程データから生成される状態クラスの色と通常幅のレイアウトを担当する。
 * 画面幅に応じた列数・高さの変更はassets/css/pages/admissions/briefing/responsive.cssへ分離する。
 */

/**
 * 1.0 開催月タブとカレンダー
 *
 * 月ごとの説明会日程を切り替え、受付状態を日付セル内で比較できるPC表示を管理する。
 */

.event-schedule {
	padding: 88px 0 100px;
	background: #fffafc;
	border-top: 1px solid rgba(239, 120, 188, 0.72);
}

.schedule-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 44px;
	align-items: start;
}

.schedule-intro {
	position: sticky;
	top: 118px;
}

.schedule-intro p:not(.eyebrow) {
	color: var(--muted);
	line-height: 2;
}

.schedule-tabs {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(78px, 1fr));
	overflow: hidden;
	margin-top: 38px;
	border: 1px solid rgba(239, 120, 188, 0.78);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(158, 83, 105, 0.07);
}

.schedule-tabs button {
	min-width: 0;
	min-height: 58px;
	padding: 0 12px;
	color: #7f7278;
	font-family: Georgia, serif;
	font-size: 16px;
	font-weight: 700;
	background: transparent;
	border: 0;
	border-right: 1px solid rgba(239, 120, 188, 0.34);
	cursor: pointer;
	transition: color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.schedule-tabs button:last-child {
	border-right: 0;
}

.schedule-tabs button:hover,
.schedule-tabs button:focus-visible,
.schedule-tabs button.is-active {
	color: #ef78bc;
	background: rgba(239, 120, 188, 0.07);
}

.schedule-tabs button.is-active {
	box-shadow: inset 0 -3px 0 #ef78bc;
}

.schedule-calendar-wrap {
	padding: 26px 26px 24px;
	background: #fff;
	border: 1px solid rgba(239, 120, 188, 0.95);
	border-radius: 24px;
	box-shadow: var(--shadow);
}

.schedule-calendar-head {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	align-items: flex-end;
	margin-bottom: 22px;
}

.schedule-calendar-head__eyebrow {
	margin: 0 0 8px;
	color: var(--rose);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.schedule-calendar-head__title {
	margin: 0;
	color: #9e5369;
	font-family: "Yu Mincho", serif;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 500;
	letter-spacing: 0.08em;
}

.schedule-calendar-head__note {
	margin: 0;
	color: var(--muted);
	font-size: 11px;
	white-space: nowrap;
}

.schedule-calendar-head .dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin: 0 5px 0 12px;
	border-radius: 50%;
	vertical-align: middle;
}

.schedule-calendar-head .dot:first-child {
	margin-left: 0;
}

.dot--open {
	background: #38a66a;
}

.dot--few {
	background: #e09732;
}

.dot--closed {
	background: #8f8b8d;
}

.schedule-panel {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	animation: none;
}

.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	grid-template-rows: auto;
	grid-auto-rows: 118px;
	gap: 12px;
}

.calendar-weekday {
	padding: 12px 0;
	color: #ef78bc;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-align: center;
	text-transform: uppercase;
}

.calendar-day {
	height: 100%;
	min-height: 0;
	overflow: hidden;
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fffafc;
	border: 1px solid rgba(239, 120, 188, 0.92);
	border-radius: 16px;
}

.calendar-day--empty {
	background: transparent;
	border-style: dashed;
	opacity: 0.38;
}

.calendar-day__number {
	color: #ef78bc;
	font-family: Georgia, serif;
	font-size: 22px;
	line-height: 1;
}

.calendar-day__button {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-end;
	padding: 0;
	text-align: left;
	background: transparent;
	border: 0;
	cursor: pointer;
}

.calendar-day__button:hover .calendar-day__summary,
.calendar-day__button:focus-visible .calendar-day__summary {
	border-color: rgba(158, 83, 105, 0.44);
	box-shadow: 0 10px 22px rgba(158, 83, 105, 0.08);
	transform: translateY(-2px);
}

.calendar-day__summary {
	min-height: 58px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	padding: 9px 8px 8px 10px;
	background: #fff;
	border: 1px solid rgba(239, 120, 188, 0.95);
	border-left: 3px solid var(--rose);
	border-radius: 11px;
	transition:
		transform var(--shs-hover-lift-duration) var(--shs-hover-lift-ease),
		box-shadow var(--shs-hover-lift-duration) var(--shs-hover-lift-ease),
		border-color var(--shs-hover-lift-duration) var(--shs-hover-lift-ease);
}

.calendar-day__event-line {
	display: block;
	min-width: 0;
}

.calendar-day__category {
	display: block;
	overflow: visible;
	color: #ef78bc;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.45;
	white-space: normal;
	word-break: keep-all;
	overflow-wrap: anywhere;
}

.calendar-day__hint {
	color: var(--rose);
	font-size: 10px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.calendar-day__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 22px;
	padding: 0 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

.calendar-day__badge--open {
	color: #22834f;
	background: rgba(56, 166, 106, 0.1);
	border: 1px solid rgba(56, 166, 106, 0.55);
}

.calendar-day__badge--few {
	color: #b16a12;
	background: rgba(224, 151, 50, 0.1);
	border: 1px solid rgba(224, 151, 50, 0.62);
}

.calendar-day__badge--closed {
	color: #7b7679;
	background: rgba(143, 139, 141, 0.12);
	border: 1px solid rgba(143, 139, 141, 0.45);
}

.calendar-day--open .calendar-day__summary {
	border-left-color: #38a66a;
}

.calendar-day--few .calendar-day__summary {
	border-left-color: #e09732;
}

.calendar-day--closed .calendar-day__summary {
	border-left-color: #8f8b8d;
}

/**
 * 2.0 スマートフォン用イベント一覧
 *
 * カレンダーが狭くなる画面では、日付・カテゴリ・タイトル・受付状態を縦型一覧へ置き換える。
 */

.event-mobile-list {
	display: none;
}

.event-mobile-list__empty {
	padding: 28px 18px;
	color: var(--muted);
	text-align: center;
	background: #fffafc;
	border: 1px solid var(--line);
	border-radius: 14px;
}

.event-mobile-item {
	width: 100%;
	display: grid;
	grid-template-columns: 68px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 18px;
	text-align: left;
	background: #fff;
	border: 1px solid rgba(239, 120, 188, 0.95);
	border-radius: 16px;
	cursor: pointer;
}

.event-mobile-item + .event-mobile-item {
	margin-top: 12px;
}

.event-mobile-item__date {
	color: #ef78bc;
	text-align: center;
}

.event-mobile-item__date strong {
	display: block;
	font-family: Georgia, serif;
	font-size: 30px;
	font-weight: 400;
	line-height: 1;
}

.event-mobile-item__date span {
	display: block;
	margin-top: 6px;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.1em;
}

.event-mobile-item__category {
	display: block;
	margin-bottom: 5px;
	color: var(--rose);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.event-mobile-item__title {
	display: block;
	color: #9e5369;
	font-family: "Yu Mincho", serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.5;
}

.event-mobile-item__right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.event-mobile-item__detail {
	color: #ef78bc;
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

/**
 * 3.0 イベント詳細モーダル
 *
 * 一覧上の選択イベントをページ遷移なしで確認できるよう、背景・ダイアログ・詳細カードをまとめて管理する。
 */

.event-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 28px;
}

.event-modal[hidden] {
	display: none;
}

.event-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(158, 83, 105, 0.42);
	backdrop-filter: blur(5px);
}

.event-modal__dialog {
	position: relative;
	width: min(820px, 100%);
	max-height: min(85vh, 920px);
	overflow: auto;
	padding: 34px 34px 28px;
	background: #fff;
	border-radius: 24px;
	box-shadow: 0 24px 64px rgba(158, 83, 105, 0.22);
}

.event-modal__close {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	padding: 0;
	color: #ef78bc;
	font-size: 26px;
	line-height: 1;
	background: rgba(239, 120, 188, 0.03);
	border: 1px solid rgba(239, 120, 188, 0.95);
	border-radius: 50%;
	cursor: pointer;
	transform: rotate(0deg) scale(1);
	transition: transform 0.28s ease, color 0.28s ease, background-color 0.28s ease, box-shadow 0.28s ease;
}

.event-modal__close:hover,
.event-modal__close:focus-visible {
	color: #ffffff;
	background: #ef78bc;
	box-shadow: 0 8px 20px rgba(239, 120, 188, 0.28);
	transform: rotate(90deg) scale(1.06);
}

.event-modal__close:focus-visible {
	outline: 2px solid #56d1ca;
	outline-offset: 3px;
}

.event-modal__head {
	margin-bottom: 24px;
	padding-bottom: 18px;
	border-bottom: 1px solid rgba(239, 120, 188, 0.9);
}

.event-modal__head .eyebrow {
	margin-bottom: 12px;
}

.event-modal__head h3 {
	margin: 0 0 8px;
	color: #9e5369;
	font-family: "Yu Mincho", serif;
	font-size: clamp(24px, 4vw, 36px);
	font-weight: 500;
	letter-spacing: 0.08em;
}

.event-modal__sub {
	margin: 0;
	color: var(--muted);
}

.event-modal__body {
	display: grid;
	gap: 16px;
}

.event-detail-card {
	padding: 24px;
	background: #fffafc;
	border: 1px solid rgba(239, 120, 188, 0.92);
	border-radius: 18px;
}

.event-detail-card__top {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	align-items: center;
	margin-bottom: 16px;
}

.event-detail-card__cat {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 0 14px;
	color: #ef78bc;
	background: #fff;
	border: 1px solid rgba(239, 120, 188, 0.95);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.event-detail-card h4 {
	margin: 0 0 14px;
	color: #9e5369;
	font-family: "Yu Mincho", serif;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0.06em;
}

.event-detail-card__meta {
	margin: 0 0 16px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 18px;
}

.event-detail-card__meta div {
	display: flex;
	gap: 8px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.7;
}

.event-detail-card__meta dt {
	flex: 0 0 auto;
	color: #ef78bc;
	font-weight: 700;
}

.event-detail-card__meta dd {
	margin: 0;
}

.event-detail-card__desc {
	margin: 0 0 18px;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.9;
}

.event-detail-card__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.event-detail-card__actions .btn {
	min-width: 180px;
	justify-content: center;
}

.event-detail-card__actions .btn[aria-disabled="true"] {
	opacity: 0.48;
	pointer-events: none;
}
