/* === Calendar Block Styles === */

.shc-calendar-block {
	--shc-navy: #132B5A;
	--shc-red: #DC382E;
	--shc-red-dark: #C4322A;
	--shc-gray-bg: #F2F2F2;
	--shc-white: #FFFFFF;
	--shc-text: #132B5A;
	--shc-text-muted: #6B7280;
	--shc-border: #E5E7EB;

	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 16px;
	font-family: 'Open Sans', sans-serif;
	color: var(--shc-text);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.shc-calendar-block a {
	text-decoration: none;
	color: inherit;
}

.shc-calendar-block img {
	display: block;
	max-width: 100%;
}

/* === DOW Header === */
.shc-cal-dow {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	color: var(--shc-navy);
	text-align: center;
	padding: 10px 4px;
	background: var(--shc-white);
	border: 1px solid var(--shc-border);
	letter-spacing: 0.5px;
}

/* === Month Section === */
.shc-cal-month-section {
	margin-bottom: 32px;
}

.shc-cal-month-header {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 700;
	font-size: 26px;
	color: var(--shc-navy);
	padding: 20px 0 12px;
	text-align: center;
	position: relative;
}

.shc-cal-month-header::before,
.shc-cal-month-header::after {
	content: '';
	position: absolute;
	top: 50%;
	width: 60px;
	height: 1px;
	background: var(--shc-border);
}

.shc-cal-month-header::before {
	right: calc(50% + 120px);
}

.shc-cal-month-header::after {
	left: calc(50% + 120px);
}

.shc-cal-grid-table {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	background: var(--shc-white);
	border: 1px solid var(--shc-border);
	overflow: hidden;
}

/* === Day Cells === */
.shc-cal-day {
	background: var(--shc-white);
	border: 1px solid var(--shc-border);
	min-height: 120px;
	padding: 6px;
	vertical-align: top;
	overflow: hidden;
	position: relative;
}

.shc-cal-day--outside {
	background: var(--shc-gray-bg);
	opacity: 0.35;
	min-height: 60px;
}

.shc-cal-day--today {
	background: rgba(19, 43, 90, 0.03);
}

.shc-cal-day--past {
	opacity: 0.4;
}

.shc-cal-date-num {
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	font-size: 13px;
	color: var(--shc-navy);
	margin-bottom: 4px;
	padding: 2px 4px;
}

.shc-cal-day--today .shc-cal-date-num {
	color: var(--shc-white);
	background: var(--shc-navy);
	display: inline-block;
}

/* === Film Cards === */
.shc-cal-film-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 6px;
	padding: 4px;
	background: rgba(225, 228, 233, 0.45);
	text-align: center;
}

.shc-cal-film-thumb {
	width: 100%;
	overflow: hidden;
	position: relative;
	aspect-ratio: 16 / 9;
}

.shc-cal-film-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.shc-cal-film-info {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	padding-top: 4px;
}

.shc-cal-series-label {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 600;
	font-size: 10px;
	color: var(--shc-white);
	background: var(--shc-navy);
	padding: 4px 6px 2px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1;
	margin-bottom: 3px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 18px;
}

.shc-cal-film-title {
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 700;
	font-size: 13px;
	color: var(--shc-navy);
	line-height: 1.2;
}

.shc-cal-film-title:hover {
	text-decoration: underline;
}

.shc-cal-film-meta {
	font-family: 'Open Sans', sans-serif;
	font-weight: 400;
	font-size: 11px;
	color: var(--shc-text-muted);
	line-height: 1.3;
	margin-top: 1px;
	margin-bottom: 2px;
}

/* === Showtime Pills === */
.shc-cal-showtimes {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 4px;
	align-items: center;
	justify-content: center;
	border-top: 1px solid var(--shc-border);
	padding-top: 3px;
	width: 100%;
}

.shc-cal-showtime-link {
	font-family: 'Open Sans', sans-serif;
	font-weight: 700;
	font-size: 12px;
	color: var(--shc-navy);
	background: transparent;
	border-radius: 9999px;
	padding: 1px 8px;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	display: inline-block;
	line-height: 1.6;
}

.shc-cal-showtime-link:hover {
	background: var(--shc-red);
	color: var(--shc-white);
	text-decoration: none;
}

.shc-cal-showtime-info {
	font-weight: 700;
	font-size: 0.85em;
}

/* === States: loading, error === */
.shc-cal-loading,
.shc-cal-error {
	text-align: center;
	padding: 60px 20px;
	font-family: 'Josefin Sans', sans-serif;
	color: var(--shc-navy);
	display: none;
}

.shc-cal-spinner {
	display: inline-block;
	width: 40px;
	height: 40px;
	border: 4px solid var(--shc-border);
	border-top-color: var(--shc-red);
	border-radius: 50%;
	animation: shc-spin 0.7s linear infinite;
	margin-bottom: 16px;
}

@keyframes shc-spin {
	to { transform: rotate(360deg); }
}

.shc-cal-error-msg {
	font-size: 18px;
	margin-bottom: 16px;
	font-weight: 600;
}

.shc-cal-retry-btn {
	display: inline-block;
	background: var(--shc-red);
	color: var(--shc-white);
	font-family: 'Josefin Sans', sans-serif;
	font-weight: 700;
	font-size: 15px;
	padding: 10px 28px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.shc-cal-retry-btn:hover {
	background: var(--shc-red-dark);
}

/* === Responsive: Tablet === */
@media (max-width: 1023px) and (min-width: 768px) {
	.shc-cal-film-title {
		font-size: 12px;
	}

	.shc-cal-film-meta {
		font-size: 10px;
	}

	.shc-cal-showtime-link {
		font-size: 11px;
		padding: 1px 5px;
	}

	.shc-cal-month-header {
		font-size: 22px;
	}

	.shc-cal-day {
		min-height: 100px;
		padding: 4px;
	}
}

/* === Responsive: Mobile List View === */
@media (max-width: 767px) {
	.shc-cal-dow-bar {
		display: none;
	}

	.shc-cal-grid-table {
		display: none;
	}

	.shc-cal-month-header {
		font-size: 22px;
		padding: 16px 0 8px;
		position: sticky;
		top: 96px;
		background: var(--shc-gray-bg);
		z-index: 1;
	}

	.admin-bar .shc-cal-month-header {
		top: 142px;
	}

	.shc-cal-mobile-list {
		display: block;
	}

	.shc-cal-mobile-day {
		margin-bottom: 16px;
		background: var(--shc-white);
		overflow: hidden;
		border: 1px solid var(--shc-border);
	}

	.shc-cal-mobile-day--past {
		opacity: 0.4;
	}

	.shc-cal-mobile-date-header {
		font-family: 'Josefin Sans', sans-serif;
		font-weight: 700;
		font-size: 16px;
		color: var(--shc-navy);
		padding: 12px 14px 8px;
		border-bottom: 1px solid var(--shc-border);
		background: rgba(242, 242, 242, 0.5);
	}

	.shc-cal-mobile-film-card {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 12px 14px;
		border-bottom: 1px solid var(--shc-border);
	}

	.shc-cal-mobile-film-card:last-child {
		border-bottom: none;
	}

	.shc-cal-mobile-film-thumb {
		width: 100%;
		max-width: 280px;
		overflow: hidden;
		aspect-ratio: 16 / 9;
	}

	.shc-cal-mobile-film-thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}

	.shc-cal-mobile-film-info {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 6px;
		padding-top: 8px;
	}

	.shc-cal-mobile-series-label {
		font-family: 'Josefin Sans', sans-serif;
		font-weight: 600;
		font-size: 11px;
		color: var(--shc-white);
		background: var(--shc-navy);
		padding: 4px 10px 3px;
		text-transform: uppercase;
		letter-spacing: 0.3px;
		line-height: 1;
		margin-bottom: 6px;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 22px;
	}

	.shc-cal-mobile-film-title {
		font-family: 'Josefin Sans', sans-serif;
		font-weight: 700;
		font-size: 15px;
		color: var(--shc-navy);
		line-height: 1.25;
	}

	.shc-cal-mobile-film-title:hover {
		text-decoration: underline;
	}

	.shc-cal-mobile-film-meta {
		font-family: 'Open Sans', sans-serif;
		font-weight: 400;
		font-size: 13px;
		color: var(--shc-text-muted);
		line-height: 1.3;
		margin-top: 2px;
		margin-bottom: 3px;
	}

	.shc-cal-mobile-showtimes {
		display: flex;
		flex-wrap: wrap;
		gap: 4px 6px;
		align-items: center;
		justify-content: center;
	}

	.shc-cal-mobile-showtime-link {
		font-family: 'Open Sans', sans-serif;
		font-weight: 700;
		font-size: 14px;
		color: var(--shc-navy);
		background: transparent;
		border-radius: 9999px;
		padding: 3px 10px;
		text-decoration: none;
		cursor: pointer;
		transition: all 0.15s ease;
		white-space: nowrap;
	}

	.shc-cal-mobile-showtime-link:hover {
		background: var(--shc-red);
		color: var(--shc-white);
	}
}

/* Desktop: hide mobile list */
@media (min-width: 768px) {
	.shc-cal-mobile-list {
		display: none;
	}
}
