/**
 * GIMA LearnPress AOM Dashboard - Authenticated Header Profile Menu Styles
 *
 * @package GIMA_LP_AOM_Dashboard
 * @version 1.1.0
 */

/* Profile Badge Container in Header */
.gima-header-profile-container {
	position: relative;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	line-height: 1;
	z-index: 1000;
}

/* Compact Profile Badge (Dynamic Initial) */
.gima-header-profile-badge {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0284c7, #00aaff);
	border: 2px solid #ffffff;
	box-shadow: 0 2px 8px rgba(0, 170, 255, 0.25);
	color: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	margin: 0;
	outline: none;
	font-family: inherit;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	user-select: none;
}

.gima-header-profile-badge:hover,
.gima-header-profile-badge:focus-visible {
	transform: scale(1.08);
	box-shadow: 0 4px 14px rgba(0, 170, 255, 0.4);
	outline: none;
}

.gima-header-profile-badge .gima-profile-initial {
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	color: #ffffff;
}

/* Profile Dropdown Menu */
.gima-header-profile-dropdown {
	position: absolute;
	top: calc(100% + 12px);
	right: 0;
	min-width: 275px;
	max-width: 330px;
	background: #ffffff;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
	padding: 16px;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
	box-sizing: border-box;
	text-align: left;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Caret Arrow pointing to badge */
.gima-header-profile-dropdown::before {
	content: '';
	position: absolute;
	top: -6px;
	right: 14px;
	width: 10px;
	height: 10px;
	background: #ffffff;
	border-left: 1px solid #e2e8f0;
	border-top: 1px solid #e2e8f0;
	transform: rotate(45deg);
	z-index: 1;
}

/* Active State */
.gima-header-profile-dropdown.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Dropdown Header */
.gima-profile-dropdown-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 12px;
}

.gima-profile-dropdown-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #0284c7;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	text-transform: uppercase;
	flex-shrink: 0;
}

.gima-profile-dropdown-userinfo {
	flex: 1 1 auto;
	overflow: hidden;
}

.gima-profile-name {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.gima-profile-role-badge {
	display: inline-block;
	margin-top: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 7px;
	border-radius: 4px;
	background: #e0f2fe;
	color: #0369a1;
}

.gima-profile-role-badge.role-admin {
	background: #fef3c7;
	color: #92400e;
}

/* Details Section */
.gima-profile-dropdown-details {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	line-height: 1.4;
	color: #334155;
	margin-bottom: 12px;
}

.gima-profile-detail-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.gima-profile-detail-label {
	font-weight: 600;
	color: #64748b;
	font-size: 12px;
	flex-shrink: 0;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.gima-profile-detail-val {
	font-weight: 500;
	color: #0f172a;
	word-break: break-word;
	text-align: right;
	font-size: 13px;
}

/* Divider */
.gima-profile-dropdown-divider {
	height: 1px;
	background: #f1f5f9;
	margin: 10px 0;
}

/* Action Links */
.gima-profile-dropdown-actions {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.gima-profile-action-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none !important;
	color: #334155 !important;
	transition: background 0.15s ease, color 0.15s ease;
	line-height: 1.2;
}

.gima-profile-action-link .gima-action-icon {
	font-size: 15px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.gima-profile-action-link:hover {
	background: #f0f9ff;
	color: #0284c7 !important;
}

.gima-action-logout:hover {
	background: #fef2f2;
	color: #dc2626 !important;
}

/* Responsive Overrides */
@media (max-width: 768px) {
	.gima-header-profile-dropdown {
		right: -10px;
		max-width: calc(100vw - 32px);
		min-width: 250px;
	}

	.gima-header-profile-dropdown::before {
		right: 24px;
	}

	.gima-header-profile-badge {
		width: 36px;
		height: 36px;
	}

	.gima-header-profile-badge .gima-profile-initial {
		font-size: 15px;
	}
}

@media (max-width: 480px) {
	.gima-header-profile-dropdown {
		right: -14px;
		max-width: calc(100vw - 20px);
		min-width: 240px;
		padding: 14px;
	}
}

/* ==========================================================================
   LearnPress Notice & Error Visibility / High-Contrast Styling
   ========================================================================== */
.learn-press-message {
	display: block !important;
	padding: 14px 18px !important;
	margin: 0 0 24px 0 !important;
	border-radius: 6px !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	font-weight: 500 !important;
	box-sizing: border-box !important;
}

.learn-press-message.error {
	background-color: #fef2f2 !important;
	border: 1px solid #fecaca !important;
	border-left: 4px solid #ef4444 !important;
	color: #991b1b !important;
}

.learn-press-message.success {
	background-color: #f0fdf4 !important;
	border: 1px solid #bbf7d0 !important;
	border-left: 4px solid #22c55e !important;
	color: #166534 !important;
}

.learn-press-message:empty {
	display: none !important;
}
