/* ============================================================
   Edufen Course Widgets – User Dashboard Menu
   Adapted from Tutor Starter theme's header profile dropdown.
   Critical structural/hide-show properties use !important since
   this renders inside a theme header, where competing CSS is
   common (same lesson learned from the Login/Registration forms
   earlier in this plugin's styling).
   ============================================================ */

.ecw-udm {
	position: relative !important;
	display: inline-flex !important;
}
.ecw-udm-trigger {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	background: none !important;
	border: none !important;
	padding: 6px 4px !important;
	cursor: pointer !important;
	font: inherit;
	margin: 0 !important;
}
.ecw-udm-avatar img,
.ecw-udm-avatar .tutor-avatar {
	width: 32px !important;
	height: 32px !important;
	border-radius: 50% !important;
	display: block !important;
	object-fit: cover !important;
}
.ecw-udm-name {
	font-size: 15px;
	font-weight: 600;
	color: #212327;
	line-height: 1.2;
	white-space: nowrap;
}
.ecw-udm-chevron {
	color: #212327;
	transition: transform .2s ease;
	flex-shrink: 0 !important;
}
.ecw-udm.ecw-udm-open .ecw-udm-chevron {
	transform: rotate(180deg);
}

.ecw-udm-dropdown {
	display: none !important;
	position: absolute !important;
	top: calc(100% + 8px) !important;
	right: 0 !important;
	left: auto !important;
	z-index: 999 !important;
	width: 240px !important;
	margin: 0 !important;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .12);
	padding: 16px !important;
	list-style: none !important;
}
.ecw-udm.ecw-udm-open .ecw-udm-dropdown {
	display: block !important;
	animation: ecw-udm-fade-in .15s ease;
}
@keyframes ecw-udm-fade-in {
	from { opacity: 0; transform: translateY(-6px); }
	to { opacity: 1; transform: translateY(0); }
}
.ecw-udm-name-header {
	font-size: 15px;
	font-weight: 600;
	color: #111827;
	padding-bottom: 10px;
	margin-bottom: 8px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.ecw-udm-dropdown ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.ecw-udm-dropdown ul li {
	list-style: none !important;
	margin: 0 !important;
}
.ecw-udm-dropdown ul li + li {
	margin-top: 2px !important;
}
.ecw-udm-dropdown a {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	padding: 8px 4px !important;
	font-size: 14px;
	color: #374151;
	text-decoration: none !important;
	border-radius: 4px;
	transition: color .2s ease, background-color .2s ease;
}
.ecw-udm-dropdown a:hover {
	color: #4f46e5;
	background-color: #f9fafb;
}
.ecw-udm-dropdown a svg {
	flex-shrink: 0 !important;
	color: #6b7280;
}

.ecw-udm-login-link {
	font-size: 15px;
	font-weight: 600;
	color: #4f46e5;
	text-decoration: none;
}
.ecw-udm-login-link:hover {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.ecw-udm-dropdown { width: 220px !important; right: -10px !important; }
}
