/*
 * プラグイン My Calendar を、本番の 3.2.17 から 3.8.x に上げたことで変わった見た目を、本番に合わせる（月の表示。/calendar/）。
 * 3.8.x は HTML が変わり（ボタンが a から button に、見出し h2 が先頭に、「すべて」「本日」が増える）、本番用の style.css の指定（.category-key li a …）が当たらない。
 * プラグインの reset.css は !important や強い指定が多いので、負けるところだけ !important を付ける。
 * 動きと表記は inc/my-calendar-compat.php。月の表示（.mc-main.calendar.month）だけを対象にする。
 */

/* 1. 月の見出し
   本番のグリッド（PC）には h2 がなく、表の上に右寄せの「11月 2026」だけが出る。3.8.x は h2 が先頭にあるので、操作の部分の下（表・一覧の上）に回し、文字を本番に合わせる。
   スマホの一覧は、本番も h2 があり（「6月 2022 のイベント」。右寄せ、20px、太さ 500）、操作の部分の下に出る。 */
.mc-main.month {
	display: flex;
	flex-direction: column;
}
.mc-main.month > nav.my-calendar-navigation {
	order: 1;
}
.mc-main.month > h2.my-calendar-month {
	order: 2;
	text-align: right !important;
	font-size: 20px !important;
	font-weight: 400 !important;
	line-height: 1.62 !important;
	padding: 0 !important;
	margin: 0;
}
.mc-main.list.month > h2.my-calendar-month {
	font-weight: 500 !important;
	line-height: 28px !important;
	padding: 10px 0 0 !important;
	margin: 20px 0 0;
}
.mc-main.month > .mc-content {
	order: 3;
}

/* 2. 凡例（カテゴリー）
   本番は、見出し「カテゴリー」が見え、色つきの角丸のラベルが並ぶ（style.css の .category-key li a の指定）。
   3.8.x は、見出しを隠し（position: absolute !important）、ラベルを button + 色の点にしている。 */
.mc-main.calendar .my-calendar-header {
	display: block;
	padding: 0;
	gap: 0;
}
.mc-main .category-key {
	display: block;
	margin: 0 0 30px;
}
.mc-main .category-key h3.maybe-hide {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0 0 10px;
	padding: 10px 0 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
	display: block;
	color: #212529;
}
.mc-main .category-key ul {
	display: block;
	gap: 0;
	margin: 0;
	padding: 0;
}
.mc-main .category-key li {
	display: inline-block;
	margin: 0 5px 6px 0;
}
.mc-main .category-key li button.mc-navigation-button {
	display: inline;
	color: #fff;
	border: 1px solid #fff;
	border-radius: 5px;
	padding: 6px 7px !important;
	opacity: 0.7;
	text-decoration: none;
	font-size: 16px;
	line-height: 16px;
	vertical-align: baseline;
	cursor: pointer;
}
.mc-main .category-key li button.mc-navigation-button:hover {
	border: 1px solid #1c1c1c;
}
.mc-main .category-key li button span.no-icon {
	display: none;
}
.mc-main .category-key li button .mc-category-title {
	line-height: inherit;
}
.mc-main .category-key li.cat_01 button { background: #e63535; }
.mc-main .category-key li.cat_02 button { background: #57c246; }
.mc-main .category-key li.cat_03 button { background: #ff8e1c; }
.mc-main .category-key li.cat_04 button { background: #53acff; }
.mc-main .category-key li.cat_05 button { background: #ff6299; }
.mc-main .category-key li.cat_06 button { background: #ffc71f; }
/* 「すべて」: 本番にはない（カテゴリーを選んだあとに出る「すべて」のリンクだけが、黒い背景）。選んでいないときの「すべて」は出さない */
.mc-main .category-key li.all-categories > span {
	display: none;
}
.mc-main .category-key li.all-categories button {
	background: #000;
}

/* 3. 年月の選択と、前の月・次の月
   本番は、選択（select）と「移動」ボタン、「前の月へ」「次の月へ」のリンクが、横に並ぶ（inline-block）。
   3.8.x は、白い角丸のボタンと「本日」のボタンが並ぶ。 */
.mc-main .my-calendar-date-switcher,
.mc-main .my-calendar-nav {
	display: inline-block;
}
.mc-main .my-calendar-date-switcher select {
	appearance: auto;
	background-image: none;
	padding: 2px 6px !important;
	border: 1px solid #767676;
	border-radius: 0;
	height: 24px;
	font-size: 16px;
}
.mc-main .my-calendar-date-switcher input[type="submit"] {
	background: #efefef;
	color: #000;
	border: 2px outset #000;
	border-radius: 0;
	padding: 4px 6px !important;
	font-size: 16px;
	line-height: 24px !important;
}
.mc-main .my-calendar-nav ul {
	display: block;
	margin: 0;
	padding: 0;
}
.mc-main .my-calendar-nav li {
	display: inline-block;
	margin: 0 0 6px;
	list-style: none;
}
.mc-main .my-calendar-nav button.mc-navigation-button {
	display: inline !important;
	background: none;
	border: 0;
	border-radius: 0;
	color: #be361f;
	padding: 4px 6px;
	font-size: 16px;
	line-height: 24px;
	cursor: pointer;
}
/* 本番は、前の月へに右の罫線、次の月へに左の罫線があり、矢印（‹ ›）が付く。矢印は、3.8.x のアイコン（.mc-icon）を使う */
.mc-main .my-calendar-prev button.mc-navigation-button {
	border-right: 1px solid #bbb;
}
.mc-main .my-calendar-next button.mc-navigation-button {
	border-left: 1px solid #fff;
}
.mc-main .my-calendar-nav .mc-icon {
	display: inline-block !important;
	width: auto;
	color: #be361f;
	vertical-align: baseline;
}
.mc-main .my-calendar-nav .mc-icon::before {
	display: inline-block;
}
.mc-main .my-calendar-prev .mc-icon {
	margin-right: 2px;
}
.mc-main .my-calendar-next .mc-icon {
	margin-left: 3px;
}
.mc-main .my-calendar-nav li.my-calendar-today {
	display: none;
}

/* 4. 表
   罫線は本番と同じ薄い灰色。3.8.x は、見出し行の下に太い線（thead の border-bottom: 4px）を引き、イベントのある日の日付を黒い帯にする。本番にはない */
.mc-main .my-calendar-table th,
.mc-main .my-calendar-table td {
	border: 1px solid #ccc;
}
.mc-main.calendar .my-calendar-table thead {
	border-bottom: 0;
}
/* tbody に灰色（#f5f5f5）の背景が付き、前月・翌月のマス（半透明）が、本番より濃い灰色に見える。本番の tbody は透明 */
.mc-main .my-calendar-table tbody {
	background: transparent;
}
.mc-main .my-calendar-table td .mc-date {
	background: transparent;
	color: #212529;
	font-weight: 400;
	text-align: right;
}
/* 日付の数字: 本番は太さ 400・文字色 #212529。3.8.x は太さ 600・黒（今日以外の .no-events は、上の指定に負けて黒のまま）。
   フォントを本番に戻した（tcd220-compat.css の 6）あと、太字のままだと本番より目立つので、太さと色も合わせる（2026-11-27）。 */
.mc-main .my-calendar-table td .mc-date.no-events {
	color: #212529;
	font-weight: 400;
}
.mc-main .my-calendar-table,
.mc-main .my-calendar-table td {
	color: #212529;
}

/* 5. イベント（日付のマスの中）
   本番は、イベント名が白字で、文字は 12px・太さ 500・行間 18px、上下 4px 左右 6px の余白。3.8.x は、背景色に合わせて黒か白を選ぶ（緑の背景で黒字）。
   style.css の「.mc-main .event-title … { color: #fff !important }」が、プラグインの指定に負けるため、強い指定で白に戻す。 */
.mc-main .my-calendar-table .calendar-event h3.event-title,
.mc-main .my-calendar-table .calendar-event h3.event-title button,
.mc-main .my-calendar-table .calendar-event h3.event-title .event-title-container {
	color: #fff !important;
	font-size: 12px;
	font-weight: 500;
	line-height: 18px;
}
.mc-main .my-calendar-table .calendar-event h3.event-title button {
	padding: 4px 6px;
	text-align: left;
}

/* 6. 今日のマス
   本番は薄い黄色の背景（style.css の .mc-main .current-day）。3.8.x は、強い指定（アウトライン 2px と背景の変数）で、灰色に黒枠にしている */
.mc-main .my-calendar-table td.current-day {
	background: #feffdf !important;
	outline: 0 !important;
}

/* 7. スマホの一覧表示（日付ごとの行）
   本番は 1 行 48px の簡素なリスト（偶数行だけ薄い灰色）で、日付の前に「＋」が付く。3.8.x は、日付のボタンが 20px・余白 8px で、「＋」が別の行になって、1 行が 80px を超え、全行が灰色になる。
   プラグインの twentytwenty.css（.mc-main.twentytwenty .mc-list .mc-events）と reset.css（.mc-main .mc-list .event-date button.mc-text-button。色は !important）に負けないよう、クラスを足して強くする。 */
/* 日付ごとの詳細（クリックでモーダルに出る）を入れた非表示の箱。1px の線と上下 7px の余白が残り、行が高くなる。一覧の中では出さない（モーダルの中の複製には効かない） */
.mc-main.month .mc-list .mc-list-date-wrapper {
	display: none;
}
.mc-main.month .mc-list {
	border: 0;
	border-top: 1px solid #efefef;
	border-left: 1px solid #efefef;
	margin: 0;
	padding: 0;
}
.mc-main.month .mc-list li.mc-events {
	background: transparent;
	padding: 10px;
	margin: 0;
}
.mc-main.month .mc-list li.mc-events:nth-child(even) {
	background: rgba(0, 0, 0, 0.05);
}
/* イベントがない月のメッセージ。本番は灰色の箱に黒字（上の「全行を透明」で灰色まで消えるため戻す。文字色は、3.8.x はリンクの赤茶色） */
.mc-main.month .mc-list li.no-events {
	background: rgba(0, 0, 0, 0.05);
	color: #212529;
}
.mc-main.month .mc-list li.mc-events > strong.event-date {
	font-size: 16px;
	font-weight: 600;
}
.mc-main.month .mc-list .event-date button.mc-text-button {
	display: inline-block;
	padding: 0;
	font-size: 16px;
	font-weight: 400;
	color: #313131 !important;
	text-decoration: none;
}
.mc-main.month .mc-list .event-date button.mc-text-button .mc-date-text {
	text-decoration: none;
}
.mc-main.month .mc-list .event-date button.mc-text-button .mc-icon {
	display: inline !important;
	width: auto;
	margin-right: 3px;
}
.mc-main.month .mc-list .event-date button.mc-text-button .mc-icon::before {
	display: inline-block;
}
