/*
 * videos.css - %VIDEO% / site_video() (video_functions.inc)
 *
 * Copyright 2026 - Onespot Web Integration
 * Version 1.03.0  (24/11/2026)
 *
 * ChangeLog:
 * 1.03.0 24/11/2026 - Stage 5: background videos (.osv--background,
 *   .osv-bg-*), gallery carousel (.osv-gallery--carousel / .osv-carousel).
 * 1.02.0 24/11/2026 - Galleries: grid and list layouts, columns per
 *   screen size (--osvg-cols / -md / -sm), titles and descriptions.
 * 1.01.0 24/11/2026 - Frosted circle and own-image play buttons;
 *   --osv-play-size / --osv-play-opacity.
 * 1.00.0 24/11/2026 - New (video system stage 3).
 *
 * Served to each site by /styles/videos.php (or printed inline).
 * A skin's styles/videos.css replaces this file.
 * Every rule is one class strong, so a skin's element rules (button, img,
 * figure, iframe) can't break it, and any skin rule with two classes or
 * an id wins. Sizes are in em so it follows the page's font size.
 */

/* ---- the box ---- */
.osv { display: block; width: 100%; margin: 0 auto 1.5em; padding: 0; border: 0; float: none; }
.osv--align-left { margin-left: 0; margin-right: auto; }
.osv--align-right { margin-left: auto; margin-right: 0; }
.osv-frame {
	position: relative; display: block; width: 100%; overflow: hidden; background: #000;
	aspect-ratio: var(--osv-ratio, 16 / 9);
}
@supports not (aspect-ratio: 1 / 1) {
	.osv-frame { height: 0; padding-top: var(--osv-pad, 56.25%); }
}
.osv--rounded .osv-frame { border-radius: .75em; }
.osv--shadow .osv-frame { box-shadow: 0 .6em 1.8em rgba(0, 0, 0, .25); }

.osv-frame > iframe, .osv-holder, .osv-play, .osv-consent {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; margin: 0; padding: 0;
}

/* ---- the cover button ---- */
.osv-play {
	display: block; background: #000; color: #fff; cursor: pointer; font: inherit; text-align: left;
	-webkit-appearance: none; appearance: none; border-radius: 0; box-shadow: none; outline-offset: -4px;
}
.osv-play:focus-visible { outline: 3px solid #fff; box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .6); }
.osv-cover {
	position: absolute; top: 0; left: 0; display: block; width: 100%; height: 100%; max-width: none;
	object-fit: cover; margin: 0; padding: 0; border: 0; border-radius: 0;
	transition: transform .35s ease, filter .35s ease;
}
.osv-cover--blank { background: linear-gradient(135deg, #2b2b2b, #111); }
.osv-play:hover .osv-cover, .osv-play:focus-visible .osv-cover { transform: scale(1.03); filter: brightness(.9); }

/* ---- play icons ---- */
.osv-icon {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); line-height: 0;
	filter: drop-shadow(0 .15em .5em rgba(0, 0, 0, .35)); transition: transform .2s ease;
}
.osv-icon svg { display: block; width: 4.25em; height: auto; max-width: none; }
.osv-icon--circle svg { width: 4.5em; }
.osv-icon--minimal svg { width: 2.5em; }
.osv-play:hover .osv-icon, .osv-play:focus-visible .osv-icon { transform: translate(-50%, -50%) scale(1.08); }

.osv-icon--youtube .osv-icon-bg { fill: #212121; fill-opacity: .8; transition: fill .2s, fill-opacity .2s; }
.osv-play:hover .osv-icon--youtube .osv-icon-bg, .osv-play:focus-visible .osv-icon--youtube .osv-icon-bg { fill: var(--osv-play-color, #f00); fill-opacity: 1; }
.osv-icon--vimeo .osv-icon-bg { fill: var(--osv-play-color, #00adef); fill-opacity: .9; }
.osv-icon--circle .osv-icon-bg { fill: var(--osv-play-color, #000); fill-opacity: .6; transition: fill-opacity .2s; }
.osv-play:hover .osv-icon--circle .osv-icon-bg { fill-opacity: .85; }
.osv-icon--minimal .osv-icon-bg { fill: var(--osv-play-color, #fff); }

/* frosted circle: see-through white, blurred behind (1.01.0) */
.osv-icon--frosted {
	display: flex; align-items: center; justify-content: center;
	width: var(--osv-play-size, 5.5em); height: var(--osv-play-size, 5.5em); border-radius: 50%;
	background: rgba(255, 255, 255, .42); border: 1px solid rgba(255, 255, 255, .55);
	-webkit-backdrop-filter: blur(6px) saturate(1.2); backdrop-filter: blur(6px) saturate(1.2);
	box-shadow: 0 .25em 1.2em rgba(0, 0, 0, .18); filter: none;
	transition: transform .2s ease, background-color .2s ease;
}
.osv-icon--frosted svg { width: 46%; height: 46%; margin-left: 6%; fill: var(--osv-play-color, #fff); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.osv-play:hover .osv-icon--frosted, .osv-play:focus-visible .osv-icon--frosted { background: rgba(255, 255, 255, .58); }

/* your own image (1.01.0) */
.osv-icon--image { filter: none; }
.osv-icon--image img {
	display: block; width: var(--osv-play-size, auto); max-width: 40vw; height: auto; max-height: none;
	margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none;
	opacity: var(--osv-play-opacity, .85); transition: opacity .2s ease;
}
.osv-play:hover .osv-icon--image img, .osv-play:focus-visible .osv-icon--image img { opacity: 1; }

/* ---- title + length on the cover ---- */
.osv-title {
	position: absolute; left: 0; right: 0; top: 0; padding: .9em 1em 2.2em; font-weight: 600; font-size: 1em; line-height: 1.3;
	color: #fff; background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
	overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.osv-duration {
	position: absolute; right: .6em; bottom: .6em; padding: .15em .45em; border-radius: .3em;
	background: rgba(0, 0, 0, .8); color: #fff; font-size: .8em; line-height: 1.4; font-variant-numeric: tabular-nums;
}

/* ---- caption ---- */
.osv-caption { display: block; margin: .6em 0 0; padding: 0; font-size: .9em; line-height: 1.4; color: inherit; opacity: .85; text-align: inherit; }
.osv--align-center .osv-caption { text-align: center; }

/* ---- consent notice ---- */
.osv-consent {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8em;
	padding: 1em 1.5em; background: rgba(0, 0, 0, .88); color: #fff; text-align: center; font-size: .9em; line-height: 1.45;
}
.osv-consent-text { margin: 0; max-width: 34em; color: #fff; }
.osv-consent-btns { display: flex; flex-wrap: wrap; gap: .6em; justify-content: center; }
.osv-consent-play, .osv-consent-link {
	display: inline-block; padding: .5em 1.1em; border-radius: .35em; font: inherit; font-weight: 600; line-height: 1.3;
	cursor: pointer; text-decoration: none; border: 2px solid #fff;
}
.osv-consent-play { background: #fff; color: #111; }
.osv-consent-link { background: transparent; color: #fff; }
.osv-consent-play:hover, .osv-consent-link:hover { opacity: .85; }
@media (max-width: 420px) { .osv-consent { font-size: .8em; padding: .6em; } }

.osv-noscript { margin: .5em 0 0; }

/* ---- galleries (1.02.0) ---- */
.osv-gallery { display: block; margin: 0 0 1.5em; padding: 0; }
.osv-gallery-intro { margin: 0 0 1em; }
.osv-gallery-items {
	display: grid; gap: 1.5em 1.25em; margin: 0; padding: 0;
	grid-template-columns: repeat(var(--osvg-cols-sm, 1), minmax(0, 1fr));
}
@media (min-width: 768px) { .osv-gallery-items { grid-template-columns: repeat(var(--osvg-cols-md, 2), minmax(0, 1fr)); } }
@media (min-width: 992px) { .osv-gallery-items { grid-template-columns: repeat(var(--osvg-cols, 3), minmax(0, 1fr)); } }
.osv-gallery-item { display: block; min-width: 0; margin: 0; padding: 0; }
.osv-gallery-item .osv { margin: 0; }
.osv-gallery-text { padding: .6em 0 0; }
.osv-gallery-title { margin: 0; font-weight: 600; line-height: 1.35; }
.osv-gallery-desc { margin: .3em 0 0; font-size: .9em; line-height: 1.45; opacity: .85; }
.osv-gallery-item .osv-icon svg { width: 3.4em; }
.osv-gallery-item .osv-icon--circle svg { width: 3.6em; }
.osv-gallery-item .osv-icon--minimal svg { width: 2em; }
.osv-gallery-item .osv-icon--frosted { width: var(--osv-play-size, 4.25em); height: var(--osv-play-size, 4.25em); }
.osv-gallery-item .osv-icon--frosted svg { width: 46%; }

/* list: video beside its text (stacked on phones) */
.osv-gallery--list .osv-gallery-items { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
	.osv-gallery--list .osv-gallery-item { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 1.5em; align-items: start; }
	.osv-gallery--list .osv-gallery-text { padding: 0; }
	.osv-gallery--list .osv-gallery-title { font-size: 1.15em; }
}

/* ---- background videos (1.03.0) ---- */
.osv--background { position: relative; }
.osv--background .osv-frame > .osv-holder { pointer-events: none; overflow: hidden; }
.osv-bg-frame {
	position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; max-width: none;
	transform: translate(-50%, -50%); border: 0; margin: 0; padding: 0; pointer-events: none;
}
.osv-bg-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; transition: opacity .8s ease; }
.osv--bg-playing .osv-bg-cover { opacity: 0; }
.osv--bg-playing.osv--bg-paused .osv-bg-cover { opacity: 0; }
.osv-bg-toggle {
	position: absolute; top: .6em; right: .6em; z-index: 3; display: inline-flex; align-items: center; justify-content: center;
	width: 2.4em; height: 2.4em; margin: 0; padding: 0; border: 0; border-radius: 50%;
	background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font: inherit; font-size: 1em; line-height: 1;
	box-shadow: none; opacity: .75; transition: opacity .2s;
}
.osv-bg-toggle[hidden] { display: none; }
.osv-bg-toggle:hover, .osv-bg-toggle:focus-visible { opacity: 1; }
.osv-bg-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.osv-bg-toggle-icon { display: block; width: .8em; height: .9em; border-left: .26em solid currentColor; border-right: .26em solid currentColor; box-sizing: border-box; }
.osv--bg-paused .osv-bg-toggle-icon { width: 0; height: 0; border-style: solid; border-width: .45em 0 .45em .75em; border-color: transparent transparent transparent currentColor; margin-left: .15em; }
.osv-bg-toggle-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- gallery carousel (1.03.0): the Sliders system's card slider ---- */
.osv-gallery--carousel .osv-gallery-items { display: block; margin: 0; padding: 0; list-style: none; }
.osv-carousel .ss-item { margin: 0; padding: 0; background: none; list-style: none; }
.osv-carousel .ss-item::before { content: none; }
.osv-carousel .owl-item > .ss-item { display: flex; flex-direction: column; width: 100%; }   /* slider.css makes card items a row */
.osv-carousel .ss-item > .osv { width: 100%; }
.osv-carousel .owl-stage-outer { padding: 2px 0 6px; }
.osv-carousel.site-slider-static .osv-gallery-items { display: grid; gap: 1.25em; grid-template-columns: repeat(var(--osvg-cols-sm, 1), minmax(0, 1fr)); }
@media (min-width: 768px) { .osv-carousel.site-slider-static .osv-gallery-items { grid-template-columns: repeat(var(--osvg-cols-md, 2), minmax(0, 1fr)); } }
@media (min-width: 992px) { .osv-carousel.site-slider-static .osv-gallery-items { grid-template-columns: repeat(var(--osvg-cols, 3), minmax(0, 1fr)); } }

/* ---- pop-up (lightbox) ---- */
.osv-lightbox {
	width: min(92vw, 1200px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0;
	background: transparent; color: #fff; overflow: visible;
}
.osv-lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.osv-lightbox-frame { position: relative; width: 100%; aspect-ratio: var(--osv-ratio, 16 / 9); background: #000; }
@supports not (aspect-ratio: 1 / 1) {
	.osv-lightbox-frame { height: 0; padding-top: var(--osv-pad, 56.25%); }
}
.osv-lightbox-frame > iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.osv-lightbox-bar { display: flex; align-items: center; gap: .75em; min-height: 2.75em; padding-top: .4em; }
.osv-lightbox-title { flex: 1 1 auto; margin: 0; font-size: 1em; font-weight: 600; line-height: 1.35; color: #fff; }
.osv-lb-btn {
	flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.6em; height: 2.6em;
	padding: 0; margin: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff;
	font: inherit; font-size: 1em; line-height: 1; cursor: pointer;
}
.osv-lb-btn:hover, .osv-lb-btn:focus-visible { background: rgba(255, 255, 255, .3); }
.osv-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.osv-lb-btn svg { width: 1.1em; height: 1.1em; display: block; }
.osv-lb-btn[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
	.osv-cover, .osv-icon, .osv-icon-bg, .osv-icon--image img, .osv-bg-cover { transition: none; }
	.osv-play:hover .osv-cover, .osv-play:focus-visible .osv-cover { transform: none; }
	.osv-play:hover .osv-icon, .osv-play:focus-visible .osv-icon { transform: translate(-50%, -50%); }
}
