/**
 * Frontend Gallery Styles for YouTube Gallery with Tabs.
 * Aligned with Sogeti Labs Design System, Podcasts Filters Nav (.filters-nav), and (.filters-more).
 */

.container.ytgwt-gallery-container,
.ytgwt-gallery-container {
	width: 100%;
	padding-right: 15px;
	padding-left: 15px;
	margin-right: auto;
	margin-left: auto;
	box-sizing: border-box;
}

@media (min-width: 576px) {
	.ytgwt-gallery-container {
		max-width: 540px;
	}
}

@media (min-width: 768px) {
	.ytgwt-gallery-container {
		max-width: 720px;
	}
}

@media (min-width: 992px) {
	.ytgwt-gallery-container {
		max-width: 960px;
	}
}

@media (min-width: 1200px) {
	.ytgwt-gallery-container {
		max-width: 1140px;
	}
}

@media (min-width: 1400px) {
	.ytgwt-gallery-container {
		max-width: 1320px;
	}
}

.ytgwt-gallery-wrapper {
	font-family: 'Ubuntu', sans-serif;
	color: #15011d;
	margin: 2rem 0;
	box-sizing: border-box;
}

.ytgwt-gallery-wrapper *,
.ytgwt-gallery-wrapper *::before,
.ytgwt-gallery-wrapper *::after {
	box-sizing: inherit;
}

html.ytgwt-modal-open,
body.ytgwt-modal-open {
	overflow: hidden;
}

body.ytgwt-modal-open {
	overscroll-behavior: none;
	touch-action: none;
}

.ytgwt-lang-filter-container {
	padding-bottom: 16px;
	border-bottom: 1px solid #e7e7e7;
}

.ytgwt-lang-filter-container .filters-tags-wrapper {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.ytgwt-lang-label {
	font-weight: 300;
	font-size: 16px;
	color: #15011d;
	margin-right: 8px;
}

.ytgwt-lang-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ytgwt-tabs-container {
	margin-bottom: 2rem;
	padding-top: 16px;
	padding-bottom: 16px;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

.filters-nav,
.ytgwt-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e2e8f0;
	list-style: none;
	margin-top: 0;
	padding-left: 4px;
	padding-right: 4px;
}

.ytgwt-lang-pill,
.filters-nav-anchor,
.ytgwt-tab-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 10px 24px;
	font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	font-weight: 300;
	color: #15011d;
	background-color: #ffffff;
	border: 1px solid #15011d;
	border-radius: 25px;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: all 0.25s ease-in-out;
	outline: none;
}

.ytgwt-tab-title {
	display: block;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 768px) {
	.filters-nav,
	.ytgwt-tabs-nav {
		gap: 8px;
	}

	.filters-nav-anchor,
	.ytgwt-tab-btn {
		max-width: calc(100vw - 54px);
		padding: 10px 14px;
		font-size: 14px;
	}
}

.ytgwt-lang-pill:hover,
.filters-nav-anchor:hover,
.ytgwt-tab-btn:hover {
	background-color: #01d1d0;
	color: #15011d;
	border-color: #01d1d0;
	/* box-shadow: 0 4px 15px rgba(1, 209, 208, 0.3); */
}

.ytgwt-lang-pill.active,
.filters-nav-anchor.active,
.ytgwt-tab-btn.active {
	background-color: #15011d;
	color: #ffffff;
	border-color: #15011d;
	font-weight: 300;
	/* box-shadow: 0 4px 15px rgba(21, 1, 29, 0.25); */
}

.ytgwt-lang-pill:focus-visible,
.filters-nav-anchor:focus-visible,
.ytgwt-tab-btn:focus-visible,
.ytgwt-lang-pill.active:focus-visible,
.filters-nav-anchor.active:focus-visible,
.ytgwt-tab-btn.active:focus-visible {
	outline: 1px solid #15011d !important;
	outline-offset: 2px !important;
	box-shadow: none !important;
}

.ytgwt-tab-panel {
	display: none;
}

.ytgwt-tab-panel.active {
	display: block;
	animation: ytgwtFadeIn 0.3s ease;
}

@keyframes ytgwtFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.ytgwt-grid {
	display: grid;
	gap: 30px;
	margin-bottom: 3rem;
}

.ytgwt-grid-cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.ytgwt-grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 992px) {
	.ytgwt-grid-cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ytgwt-grid-cols-2,
	.ytgwt-grid-cols-3 {
		grid-template-columns: 1fr;
	}
}

.ytgwt-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ytgwt-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.ytgwt-card-thumb-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #15011d;
	cursor: pointer;
	overflow: hidden;
	border-radius: 8px 8px 0 0;
}

.ytgwt-card-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ytgwt-card-thumb-wrapper:hover .ytgwt-card-thumb,
.ytgwt-card-thumb-wrapper:focus-visible .ytgwt-card-thumb {
	transform: scale(1.06);
}

.ytgwt-card-thumb-wrapper:focus-visible {
	outline: 3px solid #01d1d0;
	outline-offset: -3px;
}

.ytgwt-play-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(21, 1, 29, 0.3);
	transition: background 0.3s ease;
}

.ytgwt-card-thumb-wrapper:hover .ytgwt-play-overlay {
	background: rgba(21, 1, 29, 0.45);
}

.ytgwt-play-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #EC1C24;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
}

.ytgwt-play-btn svg {
	margin-left: 3px;
}

.ytgwt-card-thumb-wrapper:hover .ytgwt-play-btn {
	transform: scale(1.15);
	background: #01d1d0;
	color: #15011d;
}

.ytgwt-card-title {
	margin: 16px 12px 12px 12px;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.35;
}

.ytgwt-card-title-link {
	color: #15011d;
	text-decoration: none;
	transition: color 0.2s ease;
	padding: 0;
	border: 0;
	background: transparent;
	font: inherit;
	text-align: left;
	width: 100%;
	cursor: pointer;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ytgwt-card-title-link:hover,
.ytgwt-card-title-link:focus-visible {
	color: #EC1C24;
	outline: none;
	/* text-decoration: underline; */
}

.filters-bottom,
.ytgwt-load-more-wrapper {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 40px;
	margin-bottom: 50px;
	text-align: center;
}

.ytgwt-load-more-message {
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	color: #8a1f1f;
}

.filters-more,
.ytgwt-btn-load-more {
	transition: all 0.2s ease-out;
	overflow: hidden;
	cursor: pointer;
	position: relative;
	border: 1px solid #15011d;
	background: #ffffff;
	border-radius: 25px;
	color: #15011d;
	font-size: 16px;
	font-weight: 300;
	padding: 10px 24px 11px;
	display: block;
	margin-bottom: 16px;
	z-index: 1;
	text-decoration: none;
	outline: none;
}

.filters-more::before,
.ytgwt-btn-load-more::before {
	content: "";
	display: block;
	background: #01d1d0;
	border-radius: 23px;
	height: calc(100% + 2px);
	width: calc(100% + 2px);
	position: absolute;
	left: -1px;
	top: -1px;
	transform: translate(-100%) rotate(10deg);
	transform-origin: top left;
	transition: transform 0.2s ease-out;
	will-change: transform;
	z-index: -1;
}

.filters-more:hover,
.filters-more:focus,
.ytgwt-btn-load-more:hover,
.ytgwt-btn-load-more:focus {
	color: #15011d;
	border-color: #01d1d0;
	box-shadow: 0 6px 30px 0 rgba(0, 0, 0, 0.2);
	transform: scale(1.1);
	z-index: 1;
	outline: none;
}

@media (max-width: 768px) {
	.filters-more:hover,
	.ytgwt-btn-load-more:hover {
		transform: none !important;
	}
}

.filters-more:focus::before,
.filters-more:hover::before,
.ytgwt-btn-load-more:focus::before,
.ytgwt-btn-load-more:hover::before {
	transform: translate(0);
}

.filters-more.loading,
.ytgwt-btn-load-more.loading {
	opacity: 0.5;
	cursor: wait;
}

.ytgwt-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(15, 0, 20, 0.85);
	backdrop-filter: blur(5px);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ytgwt-modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

.ytgwt-modal-container {
	position: relative;
	width: 90%;
	max-width: 900px;
	background: #15011d;
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 25px 100px rgba(0, 0, 0, 0.5);
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

.ytgwt-modal-overlay.active .ytgwt-modal-container {
	transform: scale(1);
}

.ytgwt-modal-close {
	position: absolute;
	top: -15px;
	right: -15px;
	width: 40px;
	height: 40px;
	padding: 0;
	background: #EC1C24;
	color: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 50%;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
	transition: background 0.2s ease, transform 0.2s ease;
	z-index: 10;
}

.ytgwt-modal-close svg {
	width: 20px;
	height: 20px;
	display: block;
}

.ytgwt-modal-close:hover,
.ytgwt-modal-close:focus-visible {
	background: #01d1d0;
	color: #15011d;
	transform: scale(1.1);
	outline: none;
}

.ytgwt-modal-iframe-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000000;
	border-radius: 8px;
	overflow: hidden;
}

.ytgwt-modal-iframe-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ytgwt-modal-title {
	color: #ffffff;
	font-size: 16px;
	font-weight: 300;
	margin-top: 15px;
	margin-bottom: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ytgwt-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
