/**
 * Profile Videos Styles
 */

.msp-videos-panel {
	display: none;
}

.msp-videos-panel--active {
	display: block;
}

/* Videos Grid - 3 columns */
.msp-videos-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

@media (max-width: 1024px) {
	.msp-videos-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 640px) {
	.msp-videos-grid {
		grid-template-columns: 1fr;
	}
}

/* Video Card */
.msp-video-card {
	background-color: var(--color-white);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease;
}

.msp-video-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.msp-video-card__preview {
	position: relative;
	aspect-ratio: 16 / 9;
	background-color: #E0E0E0;
	cursor: pointer;
	overflow: hidden;
}

.msp-video-card__cover {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.msp-video-card__placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #E0E0E0;
}

.msp-video-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	opacity: 0.9;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.msp-video-card__preview:hover .msp-video-card__play {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1.1);
}

.msp-video-card__duration {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background-color: rgba(0, 0, 0, 0.7);
	color: #FFFFFF;
	font-family: var(--font-primary);
	font-size: 12px;
	font-weight: 500;
	padding: 2px 6px;
	border-radius: 4px;
}

.msp-video-card__info {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 12px 16px;
}

.msp-video-card__title {
	font-family: var(--font-primary);
	font-size: 14px;
	font-weight: 500;
	color: var(--color-text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.msp-video-card__delete {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 4px;
	color: var(--color-text-muted);
	cursor: pointer;
	transition: color 0.2s, background-color 0.2s;
	padding: 0;
}

.msp-video-card__delete:hover {
	color: #E74C3C;
	background-color: rgba(231, 76, 60, 0.1);
}

/* Empty State */
.msp-empty-state {
	padding: 48px 24px;
	text-align: center;
	background-color: var(--color-white);
	border-radius: 8px;
}

.msp-empty-state__text {
	font-family: var(--font-primary);
	font-size: 16px;
	color: var(--color-text-muted);
	margin: 0;
}

/* Video Upload */
.msp-video-upload {
	background-color: var(--color-white);
	border-radius: 8px;
	padding: 24px;
}

/* Video Details Form */
.msp-video-details {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--color-border-light);
}

/* Video Cover Upload */
.msp-video-cover-upload {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}

.msp-video-cover-preview {
	width: 160px;
	height: 90px;
	background-color: #F6F6F6;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.msp-video-cover-preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.msp-video-cover-placeholder {
	font-family: var(--font-primary);
	font-size: 12px;
	color: var(--color-text-muted);
}

.msp-video-cover-btn {
	flex-shrink: 0;
}

.msp-form__hint {
	font-family: var(--font-primary);
	font-size: 12px;
	color: var(--color-text-muted);
	margin-top: 8px;
}

/* Secondary Button */
.msp-btn--secondary {
	background-color: #F6F6F6 !important;
	color: var(--color-text) !important;
	border: 1px solid var(--color-border) !important;
}

.msp-btn--secondary:hover {
	background-color: #EBEBEB !important;
}

/* Video Modal */
.msp-video-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.9);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.msp-video-modal--active {
	opacity: 1;
	visibility: visible;
}

.msp-video-modal__content {
	position: relative;
	width: 90%;
	max-width: 1000px;
	aspect-ratio: 16 / 9;
	background-color: #000;
	border-radius: 8px;
	overflow: hidden;
}

.msp-video-modal__video {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.msp-video-modal__close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #FFFFFF;
	cursor: pointer;
	padding: 8px;
	font-size: 24px;
	line-height: 1;
}

.msp-video-modal__close:hover {
	opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
	.msp-video-cover-upload {
		flex-direction: column;
	}

	.msp-video-cover-preview {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}
}
