/* ---------------------------------------------
   User header component
   Stateful header control for Kadence primary menu.
   --------------------------------------------- */

.enyf-user-nav__cta-item {
	display: inline-flex;
	align-items: center;
}

.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta,
.enyf-user-nav__cta {
	/* Match the visual style of the LearnDash login/register button (aula.css):
	   pill shape, accent green background, white text, soft shadow. */
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 11px 24px;
	border-radius: 999px;
	border: none;
	background: var(--aula-accent, var(--global-palette-btn-bg, #6b7f59));
	/* Kadence menu links set color via a more specific selector, so !important
	   keeps the CTA text/icon white in both resting and hover states. */
	color: #fff !important;
	font-family: "Cabin", sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.3px;
	text-decoration: none;
	/* Kadence primary menu forces text-transform: capitalize; preserve the
	   intended "Entrar al aula" casing for the CTA label. */
	text-transform: none !important;
	box-shadow: 0 4px 16px rgba(61, 50, 41, 0.08);
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.enyf-user-nav__cta-icon {
	flex: 0 0 auto;
	color: inherit;
}

.enyf-user-nav__cta span {
	color: inherit;
}

.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:hover,
.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:focus,
.enyf-user-nav__cta:hover,
.enyf-user-nav__cta:focus {
	background: var(--aula-accent-dark, var(--global-palette-btn-bg-hover, #4f6143));
	color: #fff !important;
	transform: translateY(-1px);
	box-shadow: 0 18px 34px rgba(107, 127, 89, 0.25);
}

.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:hover .enyf-user-nav__cta-icon,
.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:focus .enyf-user-nav__cta-icon,
.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:hover span,
.header-navigation li.enyf-user-nav__cta-item > a.enyf-user-nav__cta:focus span,
.enyf-user-nav__cta:hover .enyf-user-nav__cta-icon,
.enyf-user-nav__cta:focus .enyf-user-nav__cta-icon,
.enyf-user-nav__cta:hover span,
.enyf-user-nav__cta:focus span {
	color: #fff;
}

.enyf-user-nav__cta:focus-visible {
	outline: 2px solid rgba(107, 127, 89, 0.4);
	outline-offset: 2px;
}

.enyf-user-nav__wrapper {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.enyf-user-nav__trigger {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 6px 12px 6px 6px;
	border-radius: 999px;
	background: transparent;
	color: #3d3229;
	font-family: "Cabin", sans-serif;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.enyf-user-nav__trigger:hover,
.enyf-user-nav__trigger:focus {
	background: rgba(61, 50, 41, 0.04);
	border-color: rgba(61, 50, 41, 0.08);
}

.enyf-user-nav__trigger:focus-visible {
	outline: 2px solid rgba(107, 127, 89, 0.5);
	outline-offset: 2px;
}

.enyf-user-nav__avatar {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	overflow: hidden;
	background: rgba(107, 127, 89, 0.15);
}

.enyf-user-nav__avatar-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.enyf-user-nav__label {
	white-space: nowrap;
}

.enyf-user-nav__caret {
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s ease;
}

.enyf-user-nav__wrapper.is-open .enyf-user-nav__caret {
	transform: rotate(180deg);
}

.enyf-user-nav__dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	min-width: 220px;
	padding: 10px 0;
	margin: 0;
	list-style: none;
	background: #ffffff;
	border-radius: 16px;
	border: 1px solid rgba(61, 50, 41, 0.1);
	box-shadow: 0 16px 40px rgba(61, 50, 41, 0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 9999;
}

.enyf-user-nav__wrapper.is-open .enyf-user-nav__dropdown,
.enyf-user-nav__wrapper:focus-within .enyf-user-nav__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

@media (hover: hover) {
	.enyf-user-nav__wrapper:hover .enyf-user-nav__dropdown {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}
}

.enyf-user-nav__dropdown-item {
	margin: 0;
	padding: 0;
}

.enyf-user-nav__link {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 8px;
	padding: 10px 16px;
	border-radius: 12px;
	color: #3d3229;
	font-family: "Cabin", sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.enyf-user-nav__link:hover,
.enyf-user-nav__link:focus {
	background: rgba(107, 127, 89, 0.12);
	color: #3d3229;
}

.enyf-user-nav__link:focus-visible {
	outline: 2px solid rgba(107, 127, 89, 0.4);
	outline-offset: -2px;
}

.enyf-user-nav__link--logout {
	background: #3d3229;
	color: #fff;
}

.enyf-user-nav__link--logout:hover,
.enyf-user-nav__link--logout:focus {
	background: #221a12;
	color: #fff;
}

/* Mobile nav drawer */
.kadence-mobile-menu .enyf-user-nav__wrapper,
.mobile-navigation .enyf-user-nav__wrapper {
	width: 100%;
	flex-direction: column;
	align-items: stretch;
	margin: 6px 0;
}

.kadence-mobile-menu .enyf-user-nav__trigger,
.mobile-navigation .enyf-user-nav__trigger {
	width: 100%;
	justify-content: flex-start;
	padding: 12px;
	border: 1px solid rgba(61, 50, 41, 0.08);
	border-radius: 14px;
	background: rgba(61, 50, 41, 0.02);
}

.kadence-mobile-menu .enyf-user-nav__trigger:hover,
.mobile-navigation .enyf-user-nav__trigger:hover,
.kadence-mobile-menu .enyf-user-nav__trigger:focus,
.mobile-navigation .enyf-user-nav__trigger:focus {
	background: rgba(61, 50, 41, 0.06);
}

.kadence-mobile-menu .enyf-user-nav__caret,
.mobile-navigation .enyf-user-nav__caret {
	margin-left: auto;
}

.kadence-mobile-menu .enyf-user-nav__dropdown,
.mobile-navigation .enyf-user-nav__dropdown {
	position: static;
	width: 100%;
	margin-top: 10px;
	box-shadow: none;
	border-radius: 14px;
	border: 1px solid rgba(61, 50, 41, 0.08);
	opacity: 1;
	visibility: visible;
	transform: none;
	display: none;
}

.kadence-mobile-menu .enyf-user-nav__wrapper.is-open .enyf-user-nav__dropdown,
.mobile-navigation .enyf-user-nav__wrapper.is-open .enyf-user-nav__dropdown {
	display: block;
}

.kadence-mobile-menu .enyf-user-nav__link,
.mobile-navigation .enyf-user-nav__link {
	width: 100%;
	justify-content: flex-start;
}

.kadence-mobile-menu .enyf-user-nav__cta-item,
.mobile-navigation .enyf-user-nav__cta-item {
	width: 100%;
	margin: 6px 0;
}

.kadence-mobile-menu .enyf-user-nav__cta,
.mobile-navigation .enyf-user-nav__cta {
	width: 100%;
	justify-content: center;
	padding: 12px 18px;
}
