/*
 * Movie Dashboard: public "Lịch chiếu phim" page ([md_lich_chieu]).
 * Mobile first: base rules are the phone layout, then 768px (tablet) and
 * 1024px (desktop). Everything is scoped to .mdl so theme styles stay intact.
 */
.mdl {
	--mdl-row: 84px;
	min-width: 0;
	max-width: 100%;
	--mdl-accent: #c58560;
	--mdl-accent-soft: #da966e;
	--mdl-accent-text: #f0b28c;
	--mdl-purple: #522e75;
	--mdl-surface: #101720;
	--mdl-surface-2: #1d2633;
	--mdl-chip: #141d29;
	--mdl-line: #1f2a38;
	--mdl-line-2: #2f3d50;
	--mdl-text: #e6e6e6;
	--mdl-muted: #a7b0ba;
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 8px 0 24px;
	color: var(--mdl-text);
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
}

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

.mdl p {
	margin: 0;
}

.mdl .mdl-sub,
.mdl .mdl-note {
	color: var(--mdl-muted);
	font-size: 12px;
}

/* Day tabs: one swipeable row on phones. */
.mdl .mdl-days {
	display: flex;
	gap: 8px;
	max-width: 100%;
	margin: 0;
	padding: 0 0 4px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.mdl .mdl-days::-webkit-scrollbar {
	display: none;
}

.mdl .mdl-day {
	flex: 0 0 auto;
	min-width: 76px;
	min-height: 48px;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid #2a3646;
	border-radius: 8px;
	background: var(--mdl-surface);
	color: var(--mdl-text);
	font: inherit;
	text-align: center;
	cursor: pointer;
	scroll-snap-align: start;
}

.mdl .mdl-day b,
.mdl .mdl-day small {
	display: block;
}

.mdl .mdl-day b {
	font-size: 13px;
}

.mdl .mdl-day small {
	margin-top: 2px;
	font-size: 11px;
}

.mdl .mdl-day.is-on {
	border-color: var(--mdl-accent);
	background: var(--mdl-accent);
	color: #1a0f08;
}

.mdl .mdl-day:focus-visible,
.mdl .mdl-list:focus-visible,
.mdl .mdl-arrow:focus-visible,
.mdl a:focus-visible {
	outline: 2px solid var(--mdl-accent-text);
	outline-offset: 2px;
}

/* Sections. */
.mdl .mdl-sec {
	overflow: hidden;
	border: 1px solid var(--mdl-line);
	border-radius: 10px;
	background: var(--mdl-surface);
}

.mdl .mdl-sec-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--mdl-line);
}

.mdl .mdl-h2 {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--mdl-accent-soft);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
}

.mdl .mdl-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 5px;
}

.mdl .mdl-badges[hidden],
.mdl .mdl-panel[hidden] {
	display: none;
}

.mdl .mdl-b {
	padding: 2px 9px;
	border: 1px solid var(--mdl-line-2);
	border-radius: 999px;
	color: #c9d1da;
	font-size: 11px;
	white-space: nowrap;
}

.mdl .mdl-b.is-day {
	border-color: var(--mdl-accent);
	background: #2a1d17;
	color: var(--mdl-accent-text);
	font-weight: 700;
}

.mdl .mdl-b.is-count {
	border-color: var(--mdl-purple);
	background: var(--mdl-purple);
	color: #fff;
	font-weight: 700;
}

/* At most --mdl-rows titles, then the list scrolls. */
.mdl .mdl-list {
	max-height: calc(var(--mdl-row) * var(--mdl-rows, 5));
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--mdl-accent) var(--mdl-surface);
}

.mdl .mdl-row {
	display: flex;
	align-items: center;
	gap: 12px;
	height: var(--mdl-row);
	padding: 10px 14px;
	border-bottom: 1px solid #18212d;
}

.mdl .mdl-poster {
	flex: 0 0 44px;
	width: 44px;
	height: 62px;
	border-radius: 5px;
	background: var(--mdl-surface-2);
	object-fit: cover;
}

.mdl .mdl-info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.mdl .mdl-title {
	align-self: flex-start;
	max-width: 100%;
	overflow: hidden;
	padding: 3px 9px;
	border: 1px solid var(--mdl-line-2);
	border-radius: 6px;
	background: var(--mdl-surface-2);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mdl .mdl-title:hover {
	border-color: var(--mdl-accent);
	color: var(--mdl-accent-text);
}

.mdl .mdl-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	max-height: 20px;
	overflow: hidden;
}

.mdl .mdl-tag {
	padding: 1px 8px;
	border: 1px solid var(--mdl-line-2);
	border-radius: 999px;
	background: var(--mdl-chip);
	color: #c9d1da;
	font-size: 11px;
	white-space: nowrap;
}

.mdl .mdl-ep {
	flex: 0 0 auto;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--mdl-purple);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.mdl .mdl-watch {
	display: none;
}

.mdl .mdl-empty {
	padding: 18px 14px;
	color: var(--mdl-muted);
	font-size: 13px;
}

/* Upcoming: a strip you drag (mouse) or swipe (touch). */
.mdl .mdl-arrows {
	display: none;
	gap: 8px;
}

.mdl .mdl-arrow {
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #2a3646;
	border-radius: 999px;
	background: var(--mdl-surface);
	color: var(--mdl-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.mdl .mdl-strip {
	display: flex;
	gap: 12px;
	padding: 14px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	cursor: grab;
	-webkit-overflow-scrolling: touch;
}

.mdl .mdl-strip::-webkit-scrollbar {
	display: none;
}

.mdl .mdl-strip.is-drag {
	scroll-snap-type: none;
	cursor: grabbing;
}

.mdl .mdl-card {
	display: flex;
	flex: 0 0 140px;
	flex-direction: column;
	gap: 6px;
	color: var(--mdl-text);
	text-decoration: none;
	scroll-snap-align: start;
	user-select: none;
	-webkit-user-drag: none;
}

.mdl .mdl-card-img {
	width: 100%;
	height: 200px;
	border-radius: 8px;
	background: var(--mdl-surface-2);
	object-fit: cover;
	pointer-events: none;
}

.mdl .mdl-card-title {
	display: -webkit-box;
	overflow: hidden;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.mdl .mdl-date {
	color: var(--mdl-accent-soft);
	font-size: 12px;
	font-weight: 700;
}

.mdl .mdl-date.is-none {
	color: var(--mdl-muted);
	font-weight: 400;
}

/* Tablet. */
@media (min-width: 768px) {
	.mdl {
		--mdl-row: 94px;
		gap: 22px;
	}

	.mdl .mdl-day {
		min-width: 92px;
	}

	.mdl .mdl-h2 {
		font-size: 16px;
	}

	.mdl .mdl-b {
		font-size: 12px;
	}

	.mdl .mdl-row {
		gap: 14px;
		padding: 12px 18px;
	}

	.mdl .mdl-poster {
		flex-basis: 50px;
		width: 50px;
		height: 70px;
	}

	.mdl .mdl-title {
		font-size: 15px;
	}

	.mdl .mdl-tag {
		font-size: 12px;
	}

	.mdl .mdl-watch {
		display: inline-flex;
		flex: 0 0 auto;
		align-items: center;
		min-height: 36px;
		padding: 8px 16px;
		border-radius: 6px;
		background: var(--mdl-accent);
		color: #1a0f08;
		font-weight: 700;
		text-decoration: none;
	}

	.mdl .mdl-watch:hover {
		background: var(--mdl-accent-text);
		color: #1a0f08;
	}

	.mdl .mdl-arrows {
		display: inline-flex;
	}

	.mdl .mdl-strip {
		gap: 16px;
		padding: 18px;
	}

	.mdl .mdl-card {
		flex-basis: 170px;
	}

	.mdl .mdl-card-img {
		height: 240px;
	}
}

/* Desktop. */
@media (min-width: 1024px) {
	.mdl {
		--mdl-row: 99px;
		gap: 24px;
	}

	/* Seven equal tabs on one row, even in the theme's ~670px content column. */
	.mdl .mdl-days {
		overflow: visible;
	}

	.mdl .mdl-day {
		flex: 1 1 0;
		min-width: 0;
		padding: 6px 4px;
	}

	.mdl .mdl-poster {
		flex-basis: 52px;
		width: 52px;
		height: 74px;
	}

	.mdl .mdl-card {
		flex-basis: 180px;
	}

	.mdl .mdl-card-img {
		height: 250px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mdl .mdl-strip,
	.mdl .mdl-days {
		scroll-behavior: auto;
	}
}
