/*
 * White Rabbit - Movies Page Template Styles
 *
 * Vanilla CSS for the "Movies Page Template" (custom-templates/template-movies.php).
 * The template markup intentionally uses no Tailwind utility classes; every
 * rule lives here under the `movie-` prefix. Margins/paddings are set
 * explicitly because the theme's global Tailwind preflight resets them.
 */

.movie-archive {
	width: 100%;
	max-width: 1536px;
	margin: 0 auto;
	padding: 16px;
}

.movie-archive__header {
	margin: 0 0 16px;
}

.movie-archive__title {
	margin: 0;
	font-size: 24px;
	line-height: 32px;
	font-weight: 700;
	color: #232E36;
}

.movie-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.movie-card {
	position: relative;
	width: 100%;
	height: 100%;
	aspect-ratio: 12 / 16;
	overflow: hidden;
	background: #DDE5EB;
	border-radius: 12px;
	transition: transform 200ms ease, box-shadow 200ms ease;
}

.movie-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 24px rgb(35 46 54 / 18%);
}

.movie-card:focus-within {
	outline: 2px solid rgb(var(--white-rabbit--preset--color-primary));
	outline-offset: 2px;
}

.movie-card__link {
	display: block;
	width: 100%;
	height: 100%;
	color: #FFFFFF;
}

.movie-card__poster {
	display: flex;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.movie-card:hover .movie-card__poster,
.movie-card:focus-within .movie-card__poster {
	transform: scale(1.05);
}

.movie-card__overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 10;
	width: 100%;
	height: 12rem;
	pointer-events: none;
	background: linear-gradient(rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.9) 100%);
	border-radius: 12px;
}

.movie-card__meta {
	position: absolute;
	bottom: 0;
	left: 0;
	z-index: 20;
	width: 100%;
	padding: 12px;
}

.movie-card__title {
	margin: 0;
	overflow: hidden;
	font-size: 15px;
	line-height: 22px;
	font-weight: 500;
	color: #FFFFFF;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.movie-card__excerpt {
	margin: 0 0 4px;
	overflow: hidden;
	font-size: 14px;
	line-height: 20px;
	color: rgb(255 255 255 / 70%);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.movie-card__views {
	display: flex;
	align-items: center;
	font-size: 14px;
	line-height: 20px;
	color: rgb(255 255 255 / 70%);
}

.movie-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 16px;
	padding: 12px 16px;
}

.movie-pagination__nav {
	display: inline-flex;
}

.movie-pagination .page-numbers {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-left: -1px;
	padding: 8px 16px;
	font-size: 14px;
	line-height: 20px;
	color: #8597A5;
	background: #FFFFFF;
	border: 1px solid #DDE5EB;
	transition: color 150ms ease, background-color 150ms ease;
}

.movie-pagination .page-numbers:first-child {
	margin-left: 0;
	border-radius: 8px 0 0 8px;
}

.movie-pagination .page-numbers:last-child {
	border-radius: 0 8px 8px 0;
}

.movie-pagination a.page-numbers:hover {
	color: rgb(var(--white-rabbit--preset--color-primary));
}

.movie-pagination a.page-numbers:focus-visible {
	z-index: 1;
	outline: 2px solid rgb(var(--white-rabbit--preset--color-primary));
	outline-offset: -2px;
}

.movie-pagination .page-numbers.current {
	z-index: 1;
	font-weight: 500;
	color: rgb(var(--white-rabbit--preset--color-primary));
}

.movie-empty {
	display: flex;
	width: 100%;
	margin: 0 auto;
	padding: 16px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: #FFFFFF;
	border-radius: 12px;
}

.movie-empty__animation {
	width: 144px;
	height: auto;
	margin-bottom: 4px;
}

.movie-empty__text {
	font-size: 14px;
	line-height: 20px;
	text-align: center;
	color: #41525F;
}

@media (min-width: 640px) {
	.movie-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 768px) {
	.movie-archive {
		padding: 24px;
	}

	.movie-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1280px) {
	.movie-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.movie-card,
	.movie-card__poster {
		transition: none;
	}

	.movie-card:hover {
		transform: none;
	}

	.movie-card:hover .movie-card__poster,
	.movie-card:focus-within .movie-card__poster {
		transform: none;
	}
}
