/*
 * Carola Grove branding for Tutor LMS 4.x front-end dashboard.
 * Kept in a separate plugin so Tutor updates remain untouched.
 */

html[data-tutor-theme] :is(.tutor-dashboard-layout, .tutor-account-page-wrapper) {
	--tutor-font-family-body: "Poppins", system-ui, -apple-system, sans-serif;
	--tutor-brand-100: #faf3ee;
	--tutor-brand-200: #f3e2d6;
	--tutor-brand-300: #e9c6ad;
	--tutor-brand-400: #dda47f;
	--tutor-brand-500: #c88e68;
	--tutor-brand-600: #b87f5c;
	--tutor-brand-700: #8f6045;
	--tutor-brand-800: #6d4937;
	--tutor-brand-900: #445a6a;
	--tutor-brand-950: #344754;
	--tutor-surface-base: #f7f8f7;
	--tutor-surface-l1: #ffffff;
	--tutor-surface-l1-hover: #faf6f1;
	--tutor-surface-l2: #edf1f3;
	--tutor-surface-l2-hover: #dce5ea;
	--tutor-surface-l3: #f3f5f6;
	--tutor-surface-sidebar-l1: #445a6a;
	--tutor-surface-brand-primary: #445a6a;
	--tutor-surface-brand-primary-2: #344754;
	--tutor-surface-brand-secondary: #f3e2d6;
	--tutor-surface-brand-tertiary: #faf3ee;
	--tutor-surface-brand-quaternary: #edf1f3;
	--tutor-text-primary: #2b3942;
	--tutor-text-secondary: #52636e;
	--tutor-text-subdued: #78858d;
	--tutor-text-brand: #9d694b;
	--tutor-text-brand-hover: #7f533b;
	--tutor-icon-idle: #445a6a;
	--tutor-icon-hover: #2b3942;
	--tutor-icon-secondary: #78858d;
	--tutor-icon-brand: #b87f5c;
	--tutor-button-primary: #445a6a;
	--tutor-button-primary-hover: #344754;
	--tutor-button-primary-focused: #445a6a;
	--tutor-button-primary-soft: #f3e2d6;
	--tutor-button-primary-soft-hover: #e9c6ad;
	--tutor-border-idle: #e1e7e9;
	--tutor-border-idle2: #e1e7e9;
	--tutor-border-hover: #c5d0d5;
	--tutor-border-brand: #b87f5c;
	--tutor-border-brand-secondary: #dda47f;
	--tutor-border-brand-tertiary: #e9c6ad;
	--tutor-tab-sidebar-l2-hover: #edf1f3;
	--tutor-tab-sidebar-l2-active: #f3e2d6;
	--tutor-actions-brand-primary: #b87f5c;
	--tutor-actions-brand-secondary: #e9c6ad;
	background: #f7f8f7;
	color: #2b3942;
	font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

.tutor-screen-frontend-dashboard .tutor-account-page-wrapper {
	background: #f7f8f7;
	color: #2b3942;
}

.tutor-screen-frontend-dashboard .tutor-account-header {
	background: #ffffff;
	border-bottom: 1px solid #e1e7e9;
}

.tutor-screen-frontend-dashboard .tutor-account-container {
	max-width: 1000px;
}

.tutor-screen-frontend-dashboard .tutor-billing-body,
.tutor-screen-frontend-dashboard .tutor-account-page-wrapper .tutor-surface-l1 {
	background: #ffffff;
	border-color: #e1e7e9;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(68, 90, 106, 0.06);
}

.tutor-screen-frontend-dashboard .tutor-dashboard-layout {
	grid-template-columns: 250px minmax(0, 1fr);
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar {
	--tutor-text-primary: #ffffff;
	--tutor-text-secondary: #e3eaef;
	--tutor-text-subdued: #c6d2da;
	--tutor-text-brand: #ffffff;
	--tutor-icon-idle: #e3eaef;
	--tutor-icon-hover: #ffffff;
	--tutor-icon-brand: #ffffff;
	--tutor-border-idle: rgba(255, 255, 255, 0.16);
	--tutor-tab-sidebar-l2-hover: rgba(255, 255, 255, 0.1);
	--tutor-tab-sidebar-l2-active: #d7a17c;
	background: #445a6a;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar-logo {
	background: #ffffff;
	height: 92px;
	justify-content: center;
	padding: 12px 24px;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar-logo img {
	max-height: 68px;
	max-width: 132px;
	object-position: center;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar-logo .site-title {
	color: #445a6a;
	font-family: "League Spartan", "Poppins", sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav {
	padding: 22px 14px;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav ul li a {
	border-radius: 6px;
	gap: 10px;
	padding: 10px 16px;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar .tutor-dashboard-sidebar-nav ul li a.active {
	box-shadow: 0 6px 16px rgba(43, 57, 66, 0.18);
}

.tutor-screen-frontend-dashboard .tutor-dashboard-main,
.tutor-screen-frontend-dashboard .tutor-dashboard-body {
	background: #f7f8f7;
	min-width: 0;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-header {
	background: rgba(255, 255, 255, 0.98);
	border-bottom-color: #e1e7e9;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-layout .tutor-dashboard-page {
	max-width: 1120px;
	padding: 28px 32px 48px;
}

.tutor-screen-frontend-dashboard .tutor-surface-l1,
.tutor-screen-frontend-dashboard .tutor-dashboard-page-card,
.tutor-screen-frontend-dashboard .tutor-dashboard-home-card,
.tutor-screen-frontend-dashboard .tutor-dashboard-courses-card {
	border-color: #e1e7e9;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(68, 90, 106, 0.06);
}

.tutor-screen-frontend-dashboard .tutor-rounded-2xl {
	border-radius: 8px;
}

.tutor-screen-frontend-dashboard .tutor-btn {
	border-radius: 6px;
	font-family: "Poppins", system-ui, -apple-system, sans-serif;
	letter-spacing: 0;
}

.tutor-screen-frontend-dashboard .tutor-tabs-tab {
	text-transform: none;
}

/* Tutor hides course actions until hover; keep the primary learning action clear. */
.carola-tutor-page-courses .tutor-progress-card-actions,
.carola-tutor-page-courses .tutor-progress-card-actions .tutor-btn {
	opacity: 1 !important;
	visibility: visible !important;
}

.carola-tutor-page-courses .tutor-progress-card-actions .tutor-btn {
	min-width: 132px;
	justify-content: center;
}

/* Keep password changes inside Tutor with accessible contrast in every state. */
.tutor-screen-frontend-dashboard button[\@click*="reset-password-modal"] {
	background: #445a6a !important;
	border-color: #445a6a !important;
	color: #ffffff !important;
	display: inline-flex !important;
}

.tutor-screen-frontend-dashboard button[\@click*="reset-password-modal"]:hover,
.tutor-screen-frontend-dashboard button[\@click*="reset-password-modal"]:focus-visible {
	background: #344754 !important;
	border-color: #344754 !important;
	color: #ffffff !important;
}

/* Tutor Pro 3.9 also injects its legacy create button beside Tutor 4's button. */
.tutor-screen-frontend-dashboard .tutor-dashboard-my-courses .tutor-dashboard-create-course {
	display: none !important;
}

.tutor-screen-frontend-dashboard .tutor-input,
.tutor-screen-frontend-dashboard .tutor-form-control,
.tutor-screen-frontend-dashboard input,
.tutor-screen-frontend-dashboard select,
.tutor-screen-frontend-dashboard textarea {
	border-radius: 6px;
	font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-header-user-avatar:focus-visible,
.tutor-screen-frontend-dashboard .tutor-dashboard-sidebar a:focus-visible,
.tutor-screen-frontend-dashboard .tutor-btn:focus-visible {
	outline: 3px solid rgba(215, 161, 124, 0.48);
	outline-offset: 2px;
}

.tutor-screen-frontend-dashboard .tutor-dashboard-nav-mobile {
	background: #ffffff;
	border-top: 1px solid #e1e7e9;
	box-shadow: 0 -8px 24px rgba(68, 90, 106, 0.08);
}

.tutor-screen-frontend-dashboard .tutor-dashboard-nav-mobile a.active {
	color: #9d694b;
}

@media (max-width: 768px) {
	.tutor-screen-frontend-dashboard .tutor-dashboard-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.tutor-screen-frontend-dashboard .tutor-dashboard-header {
		padding: 14px 16px;
	}

	.tutor-screen-frontend-dashboard .tutor-dashboard-layout .tutor-dashboard-page {
		padding-left: 16px;
		padding-right: 16px;
		padding-top: 10px;
	}
}

@media (max-width: 576px) {
	.tutor-screen-frontend-dashboard .tutor-dashboard-header-left {
		min-width: 0;
	}

	.tutor-screen-frontend-dashboard .tutor-dashboard-header-left .tutor-h5 {
		max-width: calc(100vw - 92px);
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.tutor-screen-frontend-dashboard .tutor-dashboard-layout .tutor-dashboard-page {
		padding-bottom: 92px;
	}

	.carola-tutor-page-subscriptions .tutor-dashboard-content-inner.enrolled-courses > .tutor-mb-32 {
		overflow: visible;
	}

	.carola-tutor-page-subscriptions .tutor-dashboard-content-inner.enrolled-courses .tutor-nav {
		display: grid !important;
		gap: 8px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: 100%;
	}

	.carola-tutor-page-subscriptions .tutor-dashboard-content-inner.enrolled-courses .tutor-nav-item {
		margin: 0 !important;
		min-width: 0;
	}

	.carola-tutor-page-subscriptions .tutor-dashboard-content-inner.enrolled-courses .tutor-nav-link {
		justify-content: center;
		min-height: 42px;
		padding: 8px;
		text-align: center;
		white-space: normal;
		width: 100%;
	}

	.carola-tutor-page-subscriptions .tutor-dashboard-content-inner.enrolled-courses .tutor-nav-more {
		display: none !important;
	}
}
