/**
 * InnerVerse — Tutor LMS course-progress enhancements.
 *
 * Loaded on the frontend only (see neve-child/functions.php).
 * Scoped to Tutor's own classes so it cannot affect wp-admin / the block editor.
 */

/* ---- Taller, more visible progress bars ---- */
.tutor-frontend-dashboard .tutor-progress-bar,
.innerverse-course-progress .tutor-progress-bar {
	height: 8px;
	border-radius: 6px;
	background: #e6e8f0;
	overflow: hidden;
}

.tutor-frontend-dashboard .tutor-progress-value,
.innerverse-course-progress .tutor-progress-value {
	background: linear-gradient(90deg, #4A6FE3 0%, #7E5DD7 100%);
	border-radius: 6px;
	transition: width 0.45s ease;
}

/* Keep the small profile-completion segments unchanged (they set their own inline height) */
.tutor-profile-completion .tutor-progress-bar {
	height: 8px;
}

/* ---- Percentage pill badge on enrolled-course cards ---- */
.innerverse-progress-badge {
	display: inline-flex;
	align-items: center;
	background: linear-gradient(90deg, #4A6FE3 0%, #7E5DD7 100%);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	padding: 4px 10px;
	border-radius: 999px;
	white-space: nowrap;
}

.innerverse-progress-lessons {
	font-weight: 500;
}

/* ---- In Progress Courses cards ---- */
.innerverse-dashboard-progress .tutor-progress-bar {
	margin-top: 4px;
}

/* "Continue Learning" button must sit above Tutor's full-card stretched link */
.innerverse-continue-wrap {
	position: relative;
	z-index: 2;
}

.innerverse-continue-btn {
	display: inline-flex;
	align-items: center;
}

/* Visible focus state for keyboard users */
.innerverse-continue-btn:focus-visible {
	outline: 2px solid #4A6FE3;
	outline-offset: 2px;
}

/* ===================================================================
 * Dashboard "Videos" tab — responsive YouTube/Vimeo grid
 * =================================================================== */
.innerverse-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.innerverse-video-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.innerverse-video-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 34px color-mix(in oklab, #7E5DD7 14%, transparent);
}

/* 16:9 frame that makes any embedded iframe/video fully responsive */
.innerverse-video-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #0b1020;
}

.innerverse-video-frame iframe,
.innerverse-video-frame video,
.innerverse-video-frame embed,
.innerverse-video-frame object {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}

.innerverse-video-fallback {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	background: linear-gradient(135deg, #4A6FE3 0%, #7E5DD7 100%);
}

.innerverse-video-body {
	padding: 16px 18px 20px;
}

.innerverse-video-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--tutor-color-black, #1a1b25);
}

.innerverse-video-desc {
	font-size: 13.5px;
	line-height: 1.55;
	color: #5a5d6e;
}

.innerverse-video-desc p {
	margin: 0 0 8px;
}

.innerverse-video-empty {
	padding: 48px 24px;
	text-align: center;
	color: #7a7d8c;
}

.innerverse-video-empty .tutor-icon-video-camera {
	font-size: 32px;
	display: block;
	margin-bottom: 12px;
	opacity: 0.6;
}

.innerverse-video-empty-hint {
	font-size: 13px;
	color: #9a9db0;
}

/* =====================================================================
   Emotional Report nav icon — gradient heart + heartbeat
   (the nav item itself is added by a WPCode snippet; we restyle its
   icon here so it works no matter what icon class the snippet uses)
   ===================================================================== */

.tutor-dashboard-menu-item-link[href*="emotional-report"] .tutor-dashboard-menu-item-icon::before {
	content: "" !important;
}

.tutor-dashboard-menu-item-link[href*="emotional-report"] .tutor-dashboard-menu-item-icon {
	display: inline-block;
	width: 21px;
	height: 21px;
	vertical-align: -4px;
	background: linear-gradient(135deg, #5b2fb3, #a46bff 55%, #ff7ac8);
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 21.35c-.4 0-.78-.14-1.08-.4C8.7 19.05 2 13.53 2 8.9 2 5.64 4.46 3 7.5 3c1.74 0 3.41.84 4.5 2.22A5.74 5.74 0 0 1 16.5 3C19.54 3 22 5.64 22 8.9c0 4.63-6.7 10.15-8.92 12.05-.3.26-.68.4-1.08.4z'/></svg>") no-repeat center / contain;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 21.35c-.4 0-.78-.14-1.08-.4C8.7 19.05 2 13.53 2 8.9 2 5.64 4.46 3 7.5 3c1.74 0 3.41.84 4.5 2.22A5.74 5.74 0 0 1 16.5 3C19.54 3 22 5.64 22 8.9c0 4.63-6.7 10.15-8.92 12.05-.3.26-.68.4-1.08.4z'/></svg>") no-repeat center / contain;
	filter: drop-shadow(0 2px 5px rgba(164, 107, 255, 0.45));
}

/* Keep the icon visible (white) when the item is active on the blue bar */
.tutor-dashboard-menu-item.active .tutor-dashboard-menu-item-link[href*="emotional-report"] .tutor-dashboard-menu-item-icon {
	background: #fff;
	filter: none;
}

/* Gentle heartbeat on hover */
.tutor-dashboard-menu-item-link[href*="emotional-report"]:hover .tutor-dashboard-menu-item-icon {
	animation: iv-heartbeat 0.9s ease-in-out infinite;
	transform-origin: center;
}

@keyframes iv-heartbeat {
	0%, 100% { transform: scale(1); }
	25%      { transform: scale(1.18); }
	50%      { transform: scale(1); }
	70%      { transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
	.tutor-dashboard-menu-item-link[href*="emotional-report"]:hover .tutor-dashboard-menu-item-icon {
		animation: none;
	}
}
