
/**
 * Public styles for the Mad-RVD plugin
 *
 * @since      1.0.0
 * @package    Mad_RVD
 */
:root {
	--mad-rvd-accent: #e11b22;
	--mad-rvd-accent-hover: #b31319;
}

/* Video Dashboard */
.mad-rvd-video-dashboard {
	margin-bottom: 40px;
}

/* Category Navigation */
.mad-rvd-categories {
	margin-bottom: 30px;
}

.mad-rvd-category-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	padding: 0;
	margin: 0;
	border-bottom: 1px solid #eee;
	padding-bottom: 15px;
}

.mad-rvd-category-nav li a {
	display: inline-block;
	padding: 8px 15px;
	background-color: #f7f7f7;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	transition: all .2s ease;
}

.mad-rvd-category-nav li a:hover {
	background-color: #e6e6e6;
}

.mad-rvd-category-nav li.active a {
	background-color: #2271b1;
	color: #fff;
}

/* Video Grid */
.mad-rvd-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
}

.mad-rvd-video-grid[data-columns="1"] {
	grid-template-columns: 1fr;
}

.mad-rvd-video-grid[data-columns="2"] {
	grid-template-columns: repeat(2, 1fr);
}

.mad-rvd-video-grid[data-columns="3"] {
	grid-template-columns: repeat(3, 1fr);
}

.mad-rvd-video-grid[data-columns="4"] {
	grid-template-columns: repeat(4, 1fr);
}

.mad-rvd-video-grid[data-columns="5"] {
	grid-template-columns: repeat(5, 1fr);
}

.mad-rvd-video-grid[data-columns="6"] {
	grid-template-columns: repeat(6, 1fr);
}

/* Video Card */
.mad-rvd-video-card {
	background-color: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
	transition: transform .3s ease, box-shadow .3s ease;
	display: flex;
	flex-direction: column;
}

.mad-rvd-video-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, .15);
}

.mad-rvd-video-thumbnail {
	position: relative;
	height: 0;
	padding-bottom: 56.25%;
	/* 16:9 Aspect Ratio */
	overflow: hidden;
	background-color: #f0f0f0;
	width: 100%;
	display: block;
}

.mad-rvd-video-thumbnail img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .3s ease;
	display: block;
}

.mad-rvd-video-thumbnail .mad-rvd-placeholder {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mad-rvd-video-card:hover .mad-rvd-video-thumbnail img {
	transform: scale(1.05);
}

.mad-rvd-video-play-button {
	position: absolute;
	top: 80px;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 60px;
	height: 60px;
	background-color: rgba(0, 0, 0, .7);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	opacity: .8;
	transition: opacity .3s ease, background-color .3s ease;
}

.mad-rvd-video-card:hover .mad-rvd-video-play-button {
	opacity: 1;
	background-color: rgba(0, 0, 0, .8);
}

.mad-rvd-video-play-button svg {
	width: 24px;
	height: 24px;
}

.mad-rvd-video-info {
	padding: 15px;
}

.mad-rvd-youtube-feed {
	margin: 30px 0;
}

.mad-rvd-youtube-feed.mad-rvd-loading {
	opacity: .6;
	pointer-events: none;
}

.mad-rvd-video-title {
	margin-top: 0;
	margin-bottom: 10px;
	font-size: 18px;
	line-height: 1.3;
}

.mad-rvd-video-title button {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	color: #333;
	cursor: pointer;
	text-align: left;
	transition: color .2s ease;
}

.mad-rvd-video-title button:hover {
	color: #2271b1;
}

.mad-rvd-video-category {
	font-size: 14px;
	color: #666;
	margin-bottom: 10px;
}

.mad-rvd-video-description {
	font-size: 14px;
	line-height: 1.5;
	color: #555;
}

.mad-rvd-open-video {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	display: block;
}

/* Video Modal */
.mad-rvd-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, .8);
	z-index: 9999;
	overflow: auto;
	opacity: 0;
	transition: opacity .3s ease;
	align-items: center;
	justify-content: center;
}

.mad-rvd-modal.active {
	display: flex;
	opacity: 1;
}

.mad-rvd-modal-content {
	position: relative;
	background-color: #fff;
	padding: 20px;
	width: 90%;
	max-width: 900px;
	border-radius: 6px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, .3);
}

.mad-rvd-modal-close {
	position: absolute;
	top: 0;
	right: 0;
	font-size: 28px;
	font-weight: bold;
	color: #aaa;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	line-height: 30px;
	text-align: center;
	z-index: 10;
}

.mad-rvd-modal-close:hover {
	color: #333;
}

.mad-rvd-modal-header {
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.mad-rvd-modal-header h3 {
	margin: 0;
	flex: 1;
}

.mad-rvd-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	/* 16:9 Aspect Ratio */
	height: 0;
	overflow: hidden;
}

.mad-rvd-video-wrapper > div {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.mad-rvd-video-wrapper iframe, .mad-rvd-video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.mad-rvd-youtube-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-top: 15px;
}

.mad-rvd-youtube-page {
	display: inline-block;
	padding: 6px 10px;
	background: #f7f7f7;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	border: 1px solid #e6e6e6;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
	min-width: 34px;
	text-align: center;
}

.mad-rvd-youtube-page:hover {
	background: #e6e6e6;
}

.mad-rvd-youtube-page.active {
	background: var(--mad-rvd-accent);
	color: #fff;
	border-color: var(--mad-rvd-accent);
}

.mad-rvd-youtube-channel-button-wrap {
	display: flex;
	justify-content: center;
	margin-top: 15px;
}

.mad-rvd-youtube-channel-button {
	display: inline-block;
	padding: 10px 14px;
	background: var(--mad-rvd-accent);
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-weight: 600;
	transition: background-color .2s ease;
}

.mad-rvd-youtube-channel-button:hover {
	background: var(--mad-rvd-accent-hover);
}

.mad-rvd-youtube-video-link {
	text-decoration: none;
	color: var(--mad-rvd-accent);
	font-weight: 700;
}

.mad-rvd-youtube-video-link:hover {
	color: var(--mad-rvd-accent-hover);
}

.mad-rvd-youtube-video-card .mad-rvd-video-play-button {
	top: 50%;
}

.mad-rvd-youtube-play {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
	display: block;
}

.mad-rvd-youtube-video-card .mad-rvd-youtube-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.mad-rvd-youtube-feed-card {
	grid-column: 1/-1;
	padding: 15px;
}

.mad-rvd-youtube-feed-card .mad-rvd-video-info {
	padding: 0;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.mad-rvd-video-grid {
		grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
	}
	
	.mad-rvd-modal-content {
		width: 95%;
		margin: 10% auto;
	}
}

@media screen and (max-width: 480px) {
	.mad-rvd-video-grid {
		grid-template-columns: 1fr !important;
	}
	
	.mad-rvd-category-nav {
		flex-direction: column;
		gap: 5px;
	}
	
	.mad-rvd-modal-content {
		width: 95%;
		margin: 5% auto;
		padding: 15px;
	}
}
