/*--------------------------------------------------------------
# Live cams françaises (template-live-cams.php)
--------------------------------------------------------------*/
.live-cams-page {
	--wpst-main-color: #e53935;
	--lc-text: #646C79;
	--lc-muted: #9aa1ad;
	--lc-border: #e5e5e5;
	--lc-live: #ff1f4b;
}

/* header ------------------------------------------------------ */
.live-cams-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.75em 1.5em;
	margin: 0 0 1.25em;
	padding: 0 0 1em;
	border-bottom: 1px solid var(--lc-border);
}

.live-cams-heading {
	min-width: 0;
}

.live-cams-title {
	display: flex;
	align-items: center;
	gap: 0.45em;
	font-size: 1.6em;
	font-weight: bold;
	margin: 0 0 0.25em;
	min-height: 0;
	color: #333;
}

.live-cams-subtitle {
	margin: 0;
	font-size: 0.9em;
	color: var(--lc-muted);
}

.live-cams-subtitle strong {
	color: var(--wpst-main-color);
	font-size: 1.15em;
}

.live-cams-sep {
	margin: 0 0.4em;
}

.live-cams-refresh i {
	font-size: 0.85em;
}

.live-cams-refresh.is-refreshing i {
	animation: lc-spin 0.8s linear infinite;
}

/* live dot ---------------------------------------------------- */
.live-dot {
	position: relative;
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	border-radius: 50%;
	background: var(--lc-live);
	flex: 0 0 auto;
}

.live-dot::after {
	content: "";
	position: absolute;
	inset: -0.3em;
	border-radius: 50%;
	border: 2px solid var(--lc-live);
	opacity: 0;
	animation: lc-pulse 1.6s ease-out infinite;
}

@keyframes lc-pulse {
	0% { transform: scale(0.5); opacity: 0.9; }
	100% { transform: scale(1.4); opacity: 0; }
}

@keyframes lc-spin {
	to { transform: rotate(360deg); }
}

/* filters ----------------------------------------------------- */
.live-cams-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em 1em;
}

.filter-group {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.35em;
}

.filter-pill {
	display: inline-block;
	padding: 0.4em 0.95em;
	border: 1px solid var(--lc-border);
	border-radius: 999px;
	background: #fff;
	color: var(--lc-text);
	font-size: 0.85em;
	line-height: 1.4;
	white-space: nowrap;
	transition: all 150ms ease-out;
}

.filter-pill:hover,
.filter-pill:focus {
	border-color: var(--wpst-main-color);
	color: var(--wpst-main-color);
}

.filter-pill.active {
	background: var(--wpst-main-color);
	border-color: var(--wpst-main-color);
	color: #fff;
	font-weight: bold;
}

.filter-sort {
	align-items: center;
	gap: 0.4em;
}

.filter-sort label {
	color: var(--lc-muted);
}

.filter-sort select {
	border: 1px solid var(--lc-border);
	border-radius: 999px;
	background: #fff;
	color: var(--lc-text);
	font-size: 0.85em;
	padding: 0.4em 2em 0.4em 0.95em;
	height: auto;
	cursor: pointer;
}

/* notices ----------------------------------------------------- */
.live-cams-notice {
	margin: 0 0 1.25em;
	padding: 0.85em 1em;
	border-radius: 6px;
	font-size: 0.9em;
	line-height: 1.4;
}

.live-cams-notice[hidden],
.live-cams-empty[hidden],
.live-cams-more[hidden],
.live-cams-modal[hidden] {
	display: none !important;
}

.live-cams-fallback {
	background: #fff8e1;
	color: #8a6d1d;
	border: 1px solid #ffe49a;
}

.live-cams-error {
	background: #fdecea;
	color: #a13a32;
	border: 1px solid #f5c2bd;
}

.live-cams-intro {
	margin: 0 0 1.25em;
}

/* grid / cards ------------------------------------------------ */
.live-cams-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(var(--lc-columns, 4), minmax(0, 1fr));
	gap: 12px 10px;
	margin: 0;
	transition: opacity 200ms ease-out;
}

.live-cams-grid.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

/* neutralize the theme float grid : css grid keeps every row aligned whatever the card height */
#main .live-cams-grid .thumb-block,
.live-cams-grid .thumb-block {
	float: none !important;
	width: auto !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0;
}

.live-cam-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--lc-border);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out;
	animation: lc-fade-in 300ms ease-out both;
}

.live-cam-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
	border-color: var(--wpst-main-color);
}

@keyframes lc-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.live-cam-card .live-cam-link {
	display: block;
	position: relative;
}

.live-cam-card .post-thumbnail {
	background: #111;
}

.live-cam-card .inner-border {
	position: absolute;
	inset: 0;
}

.live-cam-card .inner-border img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 400ms ease-out;
}

.live-cam-card:hover .inner-border img {
	transform: scale(1.05);
}

.live-cam-card .inner-border::after {
	box-shadow: none !important;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 45%);
}

.live-cam-card .no-thumb {
	position: absolute;
	inset: 0;
	background: #222;
}

.live-cam-card .no-thumb span {
	color: #777;
	font-size: 2em;
	display: flex;
	align-items: center;
	justify-content: center;
	top: 0;
}

/* badges on the thumbnail */
.cam-badge {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.35em 0.6em;
	border-radius: 4px;
	font-size: 0.7em;
	font-weight: bold;
	line-height: 1;
	letter-spacing: 0.02em;
	color: #fff;
	background: rgba(0, 0, 0, 0.6);
	text-transform: uppercase;
	pointer-events: none;
}

.cam-badge.cam-live {
	top: 8px;
	left: 8px;
	background: var(--lc-live);
	box-shadow: 0 2px 8px rgba(255, 31, 75, 0.5);
}

.cam-badge.cam-live .live-dot {
	background: #fff;
	width: 0.55em;
	height: 0.55em;
}

.cam-badge.cam-live .live-dot::after {
	border-color: #fff;
}

.cam-badge.cam-source {
	top: 8px;
	right: 8px;
	text-transform: none;
	font-weight: normal;
}

.cam-badge.cam-flag {
	bottom: 8px;
	left: 8px;
	background: rgba(255, 255, 255, 0.92);
	color: #333;
}

.cam-badge.cam-age {
	bottom: 8px;
	right: 8px;
}

.flag-fr {
	display: inline-block;
	width: 1.3em;
	height: 0.9em;
	border-radius: 2px;
	background: linear-gradient(90deg, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66% 100%);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* hover call to action on desktop */
.cam-hover {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 180ms ease-out;
	pointer-events: none;
}

.cam-hover-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.6em 1.1em;
	border-radius: 999px;
	background: var(--wpst-main-color);
	color: #fff;
	font-weight: bold;
	font-size: 0.9em;
	line-height: 1;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	transform: translateY(6px);
	transition: transform 180ms ease-out;
}

.live-cam-card:hover .cam-hover {
	opacity: 1;
}

.live-cam-card:hover .cam-hover-button {
	transform: none;
}

/* card body */
.cam-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 0.7em 0.75em 0.75em;
}

.live-cams-grid .thumb-block .entry-header {
	height: 2.6em;
	min-height: 0;
	overflow: hidden;
	text-align: left;
	padding: 0;
	margin: 0 0 0.5em;
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	line-height: 1.3;
}

.cam-name {
	font-weight: bold;
	font-size: 1em;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cam-name:hover {
	color: var(--wpst-main-color);
}

.cam-langs {
	font-size: 0.78em;
	color: var(--lc-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.cam-tags {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.3em;
	margin: 0 0 0.7em;
	height: 1.6em;
	overflow: hidden;
}

.cam-tags span {
	display: inline-block;
	padding: 0.2em 0.55em;
	border-radius: 999px;
	background: #f3f4f6;
	color: var(--lc-text);
	font-size: 0.72em;
	line-height: 1.4;
	text-transform: capitalize;
	white-space: nowrap;
}

.cam-actions {
	display: flex;
	align-items: stretch;
	gap: 0.4em;
	margin-top: auto;
}

.live-cams-page .cam-actions .button.cam-enter {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	padding: 0.55em 0.75em;
	border-radius: 6px;
	font-size: 0.82em;
	font-weight: bold;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* empty / footer ---------------------------------------------- */
.live-cams-empty {
	clear: both;
	text-align: center;
	padding: 3em 1em;
	color: var(--lc-muted);
}

.live-cams-empty i {
	font-size: 2.5em;
	display: block;
	margin-bottom: 0.3em;
}

.live-cams-empty p {
	margin: 0 0 1em;
}

.live-cams-footer {
	clear: both;
	text-align: center;
	padding: 0.5em 0 1em;
}

.live-cams-page .live-cams-more {
	min-width: 16em;
	border-radius: 999px;
	cursor: pointer;
}

.live-cams-page .live-cams-more:disabled {
	opacity: 0.6;
	cursor: default;
}

/* preview modal ----------------------------------------------- */
.live-cams-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1em;
}

.live-cams-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.live-cams-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 960px;
	background: #111;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	animation: lc-fade-in 200ms ease-out both;
}

.live-cams-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75em 1em;
	color: #fff;
	font-weight: bold;
}

.live-cams-modal-title {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
}

.live-cams-page .live-cams-modal-close,
.live-cams-modal-close {
	background: transparent !important;
	border: 0 !important;
	color: #aaa;
	font-size: 1.2em;
	padding: 0.25em 0.5em;
	cursor: pointer;
	line-height: 1;
}

.live-cams-modal-close:hover {
	color: #fff;
}

.live-cams-modal-body {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%;
	background: #000;
}

.live-cams-modal-body iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	pointer-events: none;
}

.live-cams-modal-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1em;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 40%);
	opacity: 0;
	transition: opacity 180ms ease-out;
}

.live-cams-modal-overlay:hover {
	opacity: 1;
}

.live-cams-modal-overlay span {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.6em 1.1em;
	border-radius: 999px;
	background: var(--wpst-main-color);
	color: #fff;
	font-weight: bold;
}

.live-cams-modal-foot {
	padding: 0.75em 1em 1em;
	text-align: center;
}

.live-cams-modal-foot .button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	border-radius: 999px;
}

body.live-cams-modal-open {
	overflow: hidden;
}

/* responsive -------------------------------------------------- */
/* columns follow the theme breakpoints ; above 64em the theme "videos per row" option is injected inline */
@media only screen and (min-width: 48.001em) and (max-width: 64em) {
	.live-cams-grid {
		--lc-columns: 3;
	}
}

@media only screen and (max-width: 48em) {
	.live-cams-grid {
		--lc-columns: 2;
		gap: 10px 8px;
	}

	.live-cams-header {
		align-items: stretch;
	}

	.live-cams-title {
		font-size: 1.3em;
	}

	.live-cams-filters {
		gap: 0.5em;
	}

	.filter-pill {
		padding: 0.35em 0.75em;
		font-size: 0.8em;
	}

	.cam-hover {
		display: none;
	}

	.cam-tags {
		display: none;
	}

	.live-cams-page .cam-actions .button.cam-enter {
		font-size: 0.75em;
		padding: 0.5em 0.4em;
	}

	.live-cams-modal {
		padding: 0.5em;
	}
}
