/**
 * M Club Timetable
 *
 * Class names match the old child-theme markup exactly, so any CSS you already
 * have (in Appearance > Customize > Additional CSS) will keep applying and will
 * override these rules. This file only supplies a sane baseline.
 */

.class-schedule {
	--mct-teal:      #0f7268;
	--mct-day-text:  #ffffff;
	--mct-card-bg:   #e6e6e6;
	--mct-card-text: #111111;
	--mct-meta-text: #4a4a4a;
	--mct-radius:    6px;
	--mct-gap:       10px;

	max-width: 1400px;
	margin: 0 auto;
	box-sizing: border-box;
}

.class-schedule *,
.class-schedule *::before,
.class-schedule *::after {
	box-sizing: border-box;
}

/* --- filter ------------------------------------------------------------ */

.class-schedule .schedule-header {
	display: flex;
	justify-content: center;
	margin-bottom: 20px;
}

.class-schedule .service-filter {
	font: inherit;
	font-size: 1.15rem;
	font-weight: 600;
	padding: 10px 16px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: var(--mct-radius);
	background: transparent;
	color: inherit;
	min-width: 260px;
	text-align: center;
	cursor: pointer;
}

.class-schedule .service-filter option {
	color: #111;
	background: #fff;
}

/* --- weekly grid ------------------------------------------------------- */

.class-schedule .weekly-wrapper {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: var(--mct-gap);
	align-items: start;
}

.class-schedule .day-column {
	display: flex;
	flex-direction: column;
	gap: var(--mct-gap);
	min-width: 0;
}

.class-schedule .day-title {
	background: var(--mct-teal);
	color: var(--mct-day-text);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.2;
	text-align: center;
	padding: 12px 8px;
	border-radius: var(--mct-radius);
}

.class-schedule .class-card {
	background: var(--mct-card-bg);
	color: var(--mct-card-text);
	border-radius: var(--mct-radius);
	padding: 14px 10px;
	text-align: center;
	min-height: 96px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
}

.class-schedule .class-name {
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.25;
}

.class-schedule .class-meta,
.class-schedule .class-time {
	font-size: 0.85rem;
	line-height: 1.3;
	color: var(--mct-meta-text);
}

.class-schedule .class-time {
	font-variant-numeric: tabular-nums;
}

.class-schedule .no-class {
	text-align: center;
	font-size: 0.85rem;
	padding: 14px 10px;
	border-radius: var(--mct-radius);
	background: rgba(127, 127, 127, 0.15);
	color: inherit;
	opacity: 0.7;
}

/* --- loading state ----------------------------------------------------- */

.class-schedule.is-loading .weekly-grid {
	opacity: 0.45;
	transition: opacity 0.15s ease;
}

/* --- card layout ------------------------------------------------------- */

.class-schedule .schedule-cards-wrapper {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}

.class-schedule .schedule-card {
	background: var(--mct-card-bg);
	color: var(--mct-card-text);
	border-radius: var(--mct-radius);
	overflow: hidden;
}

.class-schedule .schedule-card-image img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.class-schedule .schedule-card-content {
	padding: 16px;
}

.class-schedule .schedule-card-title {
	margin: 0 0 6px;
	font-size: 1.05rem;
	line-height: 1.3;
}

.class-schedule .schedule-card-staff,
.class-schedule .schedule-card-time,
.class-schedule .schedule-card-day {
	font-size: 0.875rem;
	color: var(--mct-meta-text);
}

/* --- responsive -------------------------------------------------------- */

@media (max-width: 1200px) {
	.class-schedule .weekly-wrapper {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.class-schedule .weekly-wrapper {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	.class-schedule .weekly-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.class-schedule .class-card {
		min-height: 0;
	}

	.class-schedule .service-filter {
		width: 100%;
		min-width: 0;
	}
}
