/* OST Category Posts Lightbox */
.ost-cpl-list {
	display: grid;
	gap: 24px;
	margin: 0 0 1.5em;
	padding: 0;
	list-style: none;
}

.ost-cpl-cols-2 .ost-cpl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ost-cpl-cols-3 .ost-cpl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ost-cpl-cols-4 .ost-cpl-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ost-cpl-cols-5 .ost-cpl-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ost-cpl-cols-6 .ost-cpl-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.ost-cpl-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ost-cpl-thumb {
	display: block;
	overflow: hidden;
	margin-bottom: 8px;
	border-radius: 8px;
}

.ost-cpl-image {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.25s ease;
}

.ost-cpl-thumb:hover .ost-cpl-image,
.ost-cpl-thumb:focus-visible .ost-cpl-image {
	transform: scale(1.03);
}

.ost-cpl-title {
	margin: 0 0 4px;
	font-size: 1.05em;
	line-height: 1.3;
}

.ost-cpl-meta {
	margin: 0 0 6px;
	font-size: 0.85em;
	opacity: 0.75;
}

.ost-cpl-excerpt {
	margin: 0 0 6px;
}

.ost-cpl-catlink {
	margin: 0 0 10px;
	font-weight: 600;
}

/* Lightbox */
.ost-cpl-open {
	overflow: hidden;
}

.ost-cpl-overlay {
	position: fixed;
	z-index: 100000;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.6);
}

.ost-cpl-overlay[hidden] {
	display: none;
}

.ost-cpl-dialog {
	position: relative;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	width: min(820px, 100%);
	max-height: calc(100vh - 40px);
	padding: 28px 28px 16px;
	border-radius: 12px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.ost-cpl-dialog:focus {
	outline: none;
}

.ost-cpl-close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.ost-cpl-close:hover {
	background: rgba(0, 0, 0, 0.08);
}

.ost-cpl-heading {
	margin: 0 40px 12px 0;
	font-size: 1.4em;
	line-height: 1.25;
}

.ost-cpl-body {
	overflow-y: auto;
	flex: 1 1 auto;
	padding-right: 4px;
}

.ost-cpl-body img {
	max-width: 100%;
	height: auto;
}

.ost-cpl-footer {
	margin: 12px 0 0;
	padding-top: 10px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 782px) {
	.ost-cpl-list {
		grid-template-columns: 1fr !important;
	}

	.ost-cpl-dialog {
		padding: 22px 16px 12px;
		max-height: calc(100vh - 24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ost-cpl-image {
		transition: none;
	}
}
