/**
 * Single media page (desktop + mobile).
 */

.media-single-page {
	padding: 1.25rem 0 3rem;
	font-family: var(--chimisanat-font-family, Tahoma, system-ui, sans-serif);
	color: #0f172a;
	background: #f8fafc;
}

.media-single-shell {
	display: grid;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

@media (min-width: 1024px) {
	.media-single-shell {
		grid-template-columns: 5.5rem minmax(0, 1fr) 18rem;
		align-items: start;
		gap: 1.75rem;
		padding: 0 1.25rem;
	}
}

.media-rail {
	display: none;
}

@media (min-width: 1024px) {
	.media-rail {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 1rem;
		position: sticky;
		top: 6rem;
	}
}

.media-date-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.85rem 0.5rem;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	text-align: center;
}

.media-date-day {
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1;
	color: #0f172a;
}

.media-date-month,
.media-date-year {
	font-size: 0.75rem;
	font-weight: 700;
	color: #64748b;
	margin-top: 0.2rem;
}

.media-video-code {
	font-size: 0.7rem;
	font-weight: 700;
	color: #64748b;
	text-align: center;
	line-height: 1.5;
}

.media-rail-share {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.media-share-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 999px;
	border: 1px solid #e2e8f0;
	background: #fff;
	color: #334155;
	text-decoration: none;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.media-share-icon svg {
	width: 1rem;
	height: 1rem;
}

.media-share-icon:hover {
	background: #0f172a;
	border-color: #0f172a;
	color: #fff;
}

.media-main {
	min-width: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	padding: 1.25rem 1rem 1.75rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

@media (min-width: 768px) {
	.media-main {
		padding: 1.75rem 1.75rem 2rem;
	}
}

.media-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 0.85rem;
	font-size: 0.75rem;
	color: #94a3b8;
}

.media-breadcrumbs a {
	color: #64748b;
	text-decoration: none;
}

.media-breadcrumbs a:hover {
	color: #0f172a;
}

.media-breadcrumbs-current {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

.media-title {
	margin: 0;
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-weight: 900;
	line-height: 1.55;
	color: #0f172a;
}

.media-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1.25rem;
	margin-top: 0.85rem;
	color: #64748b;
	font-size: 0.8rem;
}

.media-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.media-meta-item svg {
	width: 0.95rem;
	height: 0.95rem;
	flex-shrink: 0;
}

.media-player-wrap {
	margin-top: 1.25rem;
}

.media-player-inner {
	position: relative;
	overflow: hidden;
	border-radius: 0.85rem;
	background: #0f172a;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
	aspect-ratio: 16 / 9;
}

.media-player-frame,
.media-player-video,
.media-player-inner > iframe,
.media-player-inner > video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
	background: #000;
}

.media-player-poster {
	background: #0f172a;
}

.media-player-poster img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.media-poster-cover {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: pointer;
	background: #0f172a;
	overflow: hidden;
}

.media-poster-cover__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.media-player-inner.is-playing .media-poster-cover {
	display: none;
}

.media-play-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, 0.28);
}

.media-poster-cover .media-play-overlay {
	pointer-events: none;
}

.media-play-overlay svg {
	width: 4rem;
	height: 4rem;
	padding: 1rem;
	border-radius: 999px;
	background: rgba(220, 38, 38, 0.95);
	color: #fff;
}

.media-content {
	margin-top: 1.25rem;
	font-size: 0.95rem;
	line-height: 1.9;
	color: #334155;
}

.media-content p {
	margin: 0 0 1rem;
}

.media-share-bar {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
	.media-share-bar {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.media-shortlink {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 0.75rem;
	border-radius: 0.65rem;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 0.8rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.media-shortlink svg {
	width: 0.95rem;
	height: 0.95rem;
	flex-shrink: 0;
}

.media-shortlink-copy {
	border: 0;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
}

.media-shortlink-copy:hover {
	color: #0f172a;
}

.media-share-inline {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: #334155;
}

.media-main #comments-section {
	margin-top: 1.75rem;
	padding: 1.5rem 0 0;
	border: 0;
	border-top: 1px solid #e2e8f0;
	border-radius: 0;
	box-shadow: none;
	background: transparent;
}

.media-sidebar {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 1024px) {
	.media-sidebar {
		position: sticky;
		top: 6rem;
	}
}

.media-sidebar-widgets {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.media-sidebar-widgets > .widget,
.media-sidebar-widget {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	padding: 1rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	overflow: hidden;
}

.media-sidebar-widget.chimisanat-related-media-widget,
.media-sidebar-widget.chimisanat-awareness-journey-widget {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	box-shadow: none;
	overflow: visible;
}

.media-sidebar-widget-title {
	margin: 0 0 0.85rem;
	padding-bottom: 0.45rem;
	border-bottom: 3px solid #0f172a;
	display: inline-block;
	font-size: 1rem;
	font-weight: 900;
	color: #0f172a;
}

.media-sidebar .widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.media-sidebar .widget li {
	border-bottom: 1px solid #e2e8f0;
	padding: 0.65rem 0;
	font-size: 0.85rem;
	line-height: 1.6;
}

.media-sidebar .widget li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.media-sidebar .widget li:first-child {
	padding-top: 0;
}

.media-sidebar .widget a {
	color: #0f172a;
	text-decoration: none;
	font-weight: 700;
}

.media-sidebar .widget a:hover {
	color: #b91c1c;
}

.media-sidebar .widget p {
	margin: 0 0 0.75rem;
	font-size: 0.85rem;
	line-height: 1.7;
	color: #334155;
}

.media-sidebar .widget p:last-child {
	margin-bottom: 0;
}

.media-sidebar .widget img {
	max-width: 100%;
	height: auto;
	border-radius: 0.45rem;
}

.media-related {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	padding: 1rem 1rem 0.35rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.media-related-title {
	margin: 0 0 0.85rem;
	padding-bottom: 0.45rem;
	border-bottom: 3px solid #0f172a;
	display: inline-block;
	font-size: 1rem;
	font-weight: 900;
}

.media-related-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.media-related-list li {
	border-bottom: 1px solid #e2e8f0;
}

.media-related-list li:last-child {
	border-bottom: 0;
}

.media-related-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.85rem 0;
	text-decoration: none;
	color: #0f172a;
}

.media-related-text {
	flex: 1;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.65;
}

.media-related-item img {
	width: 5.5rem;
	height: 3.75rem;
	object-fit: cover;
	border-radius: 0.45rem;
	flex-shrink: 0;
}

.media-related-item:hover .media-related-text {
	color: #b91c1c;
}

@media (max-width: 1023px) {
	.media-sidebar {
		order: 3;
	}
}

@media print {
	.media-rail-share,
	.media-share-bar,
	.media-main #comments-section,
	.media-sidebar {
		display: none !important;
	}
}
