/* WealthYatra Curated Videos — frontend */

.wy-cv {
	--wy-gold: #c9a247;
	--wy-gold-dark: #b08d3a;
	--wy-ink: #1f2329;
	--wy-muted: #6b7280;
	--wy-line: #e8e6e1;
	--wy-bg-tab: #f7f5f2;
	--wy-radius: 12px;
	font-family: inherit;
	color: var(--wy-ink);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 48px;
	box-sizing: border-box;
}

.wy-cv *,
.wy-cv *::before,
.wy-cv *::after {
	box-sizing: border-box;
}

/* Tabs */
.wy-cv__tabs-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 28px;
}

.wy-cv__tabs {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	flex: 1;
	padding: 4px 2px;
}

.wy-cv__tabs::-webkit-scrollbar {
	display: none;
}

.wy-cv__tabs-nav {
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	border: 1px solid var(--wy-line);
	background: #fff;
	color: var(--wy-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.wy-cv__tabs-nav:hover {
	border-color: var(--wy-gold);
	color: var(--wy-gold-dark);
}

.wy-cv__tab {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 132px;
	padding: 12px 16px;
	border: 1px solid var(--wy-line);
	border-radius: 10px;
	background: var(--wy-bg-tab);
	color: var(--wy-ink);
	cursor: pointer;
	text-align: left;
	transition: background .2s, color .2s, border-color .2s;
}

.wy-cv__tab-label {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
}

.wy-cv__tab-sub {
	font-size: 11px;
	color: var(--wy-muted);
	line-height: 1.2;
}

.wy-cv__tab.is-active {
	background: var(--wy-gold);
	border-color: var(--wy-gold);
	color: #fff;
}

.wy-cv__tab.is-active .wy-cv__tab-sub {
	color: rgba(255, 255, 255, 0.85);
}

/* Toolbar / Sort bar — full-width pill, left cluster matching mockup */
.wy-cv__toolbar {
	margin-bottom: 22px;
}

.wy-cv__sort-bar {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	padding: 10px 20px;
	border: 1px solid #e5e2dc;
	border-radius: 14px;
	background: #fff;
}

.wy-cv__sort-label {
	flex: 0 0 auto;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #1f2329;
	line-height: 1;
}

.wy-cv__sort-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--wy-gold);
	line-height: 0;
}

.wy-cv__sort-dropdown {
	position: relative;
	flex: 0 0 auto;
}

.wy-cv__sort-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #1f2329;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.wy-cv__sort-trigger:focus {
	outline: none;
}

.wy-cv__sort-trigger:focus-visible {
	outline: 2px solid var(--wy-gold);
	outline-offset: 3px;
	border-radius: 4px;
}

.wy-cv__sort-chevron {
	flex: 0 0 auto;
	color: #1f2329;
	transition: transform .15s ease;
}

.wy-cv__sort-dropdown.is-open .wy-cv__sort-chevron {
	transform: rotate(180deg);
}

.wy-cv__sort-menu {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 20;
	min-width: 160px;
	margin: 0;
	padding: 6px;
	list-style: none;
	border: 1px solid #e5e2dc;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(20, 20, 20, 0.12);
}

.wy-cv__sort-menu[hidden] {
	display: none !important;
}

.wy-cv__sort-menu li {
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #1f2329;
	cursor: pointer;
}

.wy-cv__sort-menu li:hover,
.wy-cv__sort-menu li[aria-selected="true"] {
	background: #f7f5f2;
	color: var(--wy-gold-dark);
}

/* View toggle (Grid / List) */
.wy-cv__view-toggle {
	display: inline-flex;
	align-items: stretch;
	margin-left: auto;
	flex: 0 0 auto;
	border: 1px solid #e5e2dc;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.wy-cv__view-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 8px 14px;
	border: 0;
	border-right: 1px solid #e5e2dc;
	background: #fff;
	color: #1f2329;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.wy-cv__view-btn:last-child {
	border-right: 0;
}

.wy-cv__view-btn svg {
	flex: 0 0 auto;
}

.wy-cv__view-btn:focus {
	outline: none;
}

.wy-cv__view-btn:focus-visible {
	outline: 2px solid var(--wy-gold);
	outline-offset: -2px;
}

.wy-cv__view-btn.is-active {
	background: var(--wy-gold);
	color: #fff;
}

.wy-cv__view-btn:not(.is-active):hover {
	background: #f7f5f2;
	color: var(--wy-gold-dark);
}

/* List-only duration — hidden in grid mode */
.wy-cv__meta-duration {
	display: none;
}

/* Grid */
.wy-cv__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px 20px;
}

.wy-cv__card {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wy-cv__card.is-hidden,
.wy-cv__card.is-overflow {
	display: none !important;
}

/* List view */
.wy-cv[data-view="list"] .wy-cv__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 32px;
	row-gap: 0;
	align-items: stretch;
}

.wy-cv[data-view="list"] .wy-cv__card {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 12px 16px;
	padding: 18px 0;
	border-bottom: 1px solid var(--wy-line);
}

.wy-cv[data-view="list"] .wy-cv__card.is-hidden,
.wy-cv[data-view="list"] .wy-cv__card.is-overflow {
	display: none !important;
}

.wy-cv[data-view="list"] .wy-cv__body {
	min-width: 0;
	gap: 4px;
}

.wy-cv[data-view="list"] .wy-cv__title {
	font-size: 15px;
}

.wy-cv[data-view="list"] .wy-cv__meta-duration {
	display: inline-block;
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--wy-muted);
	white-space: nowrap;
}

.wy-cv[data-view="list"] .wy-cv__thumb {
	position: relative;
	width: 44px;
	height: 44px;
	aspect-ratio: auto;
	border-radius: 999px;
	overflow: visible;
	background: var(--wy-gold);
	flex: 0 0 auto;
	order: 3;
}

.wy-cv[data-view="list"] .wy-cv__thumb img,
.wy-cv[data-view="list"] .wy-cv__duration {
	display: none;
}

.wy-cv[data-view="list"] .wy-cv__play {
	position: absolute;
	inset: 0;
	transform: none;
	width: 100%;
	height: 100%;
	border-radius: 999px;
	background: var(--wy-gold);
	color: #fff;
	box-shadow: none;
}

.wy-cv[data-view="list"] .wy-cv__play svg {
	width: 18px;
	height: 18px;
	margin-left: 2px;
}

.wy-cv[data-view="list"] .wy-cv__thumb:hover .wy-cv__play {
	transform: scale(1.06);
	background: var(--wy-gold-dark);
}

.wy-cv__thumb {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--wy-radius);
	overflow: hidden;
	cursor: pointer;
	background: #111;
	aspect-ratio: 16 / 9;
}

.wy-cv__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wy-cv__play {
	position: absolute;
	inset: 50% auto auto 50%;
	transform: translate(-50%, -50%);
	width: 54px;
	height: 54px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--wy-gold);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
	transition: transform .2s;
}

.wy-cv__play svg {
	margin-left: 2px;
	width: 22px;
	height: 22px;
}

.wy-cv__thumb:hover .wy-cv__play {
	transform: translate(-50%, -50%) scale(1.06);
}

.wy-cv__duration {
	position: absolute;
	right: 10px;
	bottom: 10px;
	background: rgba(0, 0, 0, 0.82);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 4px;
	line-height: 1.3;
}

.wy-cv__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wy-cv__cat {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--wy-gold-dark);
}

.wy-cv__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.35;
	font-weight: 700;
}

.wy-cv__title-btn {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	font-weight: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
}

.wy-cv__title-btn:hover {
	color: var(--wy-gold-dark);
}

.wy-cv__date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 13px;
	color: var(--wy-muted);
}

.wy-cv__empty {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--wy-muted);
	padding: 40px 0;
}

/* View more */
.wy-cv__more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 28px;
}

.wy-cv__more {
	display: none;
	border: 1px solid var(--wy-gold);
	background: #fff;
	color: var(--wy-gold-dark);
	font-weight: 700;
	font-size: 14px;
	padding: 12px 28px;
	border-radius: 8px;
	cursor: pointer;
}

.wy-cv__more.is-visible {
	display: inline-flex;
}

.wy-cv__more:hover {
	background: var(--wy-gold);
	color: #fff;
}

/* Modal */
.wy-cv__modal[hidden] {
	display: none !important;
}

.wy-cv__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.wy-cv__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 16, 0.72);
}

.wy-cv__modal-dialog {
	position: relative;
	width: min(960px, 100%);
	z-index: 1;
}

.wy-cv__modal-close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wy-cv__player {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
}

.wy-cv__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

body.wy-cv-modal-open {
	overflow: hidden;
}

@media (max-width: 960px) {
	.wy-cv__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wy-cv[data-view="list"] .wy-cv__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 24px;
	}
}

@media (max-width: 640px) {
	.wy-cv {
		padding: 0 12px 40px;
	}

	.wy-cv__grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.wy-cv[data-view="list"] .wy-cv__grid {
		grid-template-columns: 1fr;
		column-gap: 0;
	}

	.wy-cv[data-view="list"] .wy-cv__card {
		gap: 10px 12px;
		padding: 14px 0;
	}

	.wy-cv__tabs-nav {
		display: none;
	}

	.wy-cv__tab {
		min-width: 120px;
		padding: 10px 12px;
	}

	.wy-cv__sort-bar {
		min-height: 48px;
		padding: 10px 14px;
		gap: 8px;
		border-radius: 12px;
		flex-wrap: wrap;
	}

	.wy-cv__sort-label {
		font-size: 12px;
	}

	.wy-cv__sort-trigger {
		font-size: 14px;
	}

	.wy-cv__view-toggle {
		margin-left: auto;
	}

	.wy-cv__view-btn {
		padding: 8px 10px;
		font-size: 12px;
	}

	.wy-cv__view-btn span {
		display: none;
	}

	.wy-cv__modal-close {
		top: -36px;
	}
}
