/* ==========================================================================
   Account Panel
   ========================================================================== */

/* Hide backdrop for account panel on desktop - it's a dropdown, not a modal */
.eh-panel--account .eh-panel__backdrop {
	background: transparent;
}

@media (max-width: 767px) {
	.eh-panel--account .eh-panel__backdrop {
		background: var(--eh-panel-backdrop);
	}
}

.eh-panel__content--account {
	position: absolute;
	right: 1rem;
	top: calc(var(--eh-header-height) + 0.5rem);
	width: min(22rem, calc(100vw - 2rem));
	border-radius: var(--eh-radius);
	overflow: hidden;
	background: var(--eh-background);
	box-shadow: var(--eh-shadow);
	opacity: 0;
	transform: translateY(-0.5rem);
	transition: opacity var(--eh-transition), transform var(--eh-transition);
	pointer-events: none;
}

.eh-panel.is-open .eh-panel__content--account {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.eh-account-card {
	padding: 1.5rem;
}

/* Logged-in State */
.eh-account-card__identity {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--eh-border);
	margin-bottom: 0.75rem;
}

.eh-account-card__avatar {
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 999px;
	object-fit: cover;
}

.eh-account-card__initials {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	border-radius: 999px;
	background: var(--eh-secondary);
	color: var(--eh-primary);
	font-weight: 700;
	font-size: 1.1rem;
}

.eh-account-card__copy {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

.eh-account-card__name {
	font-size: 1rem;
	color: var(--eh-text);
}

.eh-account-card__email {
	color: var(--eh-text-muted);
	font-size: 0.85rem;
	word-break: break-word;
}

/* Account Menu */
.eh-account-menu {
	padding: 0;
	margin: 0;
	list-style: none;
}

.eh-account-menu__link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0;
	color: var(--eh-text);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color var(--eh-transition);
}

.eh-account-menu__link:hover {
	color: var(--eh-primary);
}

.eh-account-menu__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.eh-account-menu__icon svg {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

.eh-account-card__footer {
	border-top: 1px solid var(--eh-border);
	margin-top: 0.75rem;
	padding-top: 0;
}

.eh-account-menu__link--logout {
	color: #dc3545;
	font-weight: 600;
}

.eh-account-menu__link--logout:hover {
	color: #b02a37;
}

.eh-account-menu__link--logout .eh-account-menu__icon {
	color: #dc3545;
}

.eh-account-menu__link--logout:hover .eh-account-menu__icon {
	color: #b02a37;
}

/* Logged-out State */
.eh-account-card__welcome {
	text-align: center;
	padding: 1rem 0 1.25rem;
}

.eh-account-card__avatar-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	margin: 0 auto 0.75rem;
	border-radius: 999px;
	background: var(--eh-secondary);
}

.eh-account-card__welcome-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 0.35rem;
	color: var(--eh-text);
}

.eh-account-card__welcome-text {
	font-size: 0.85rem;
	color: var(--eh-text-muted);
	margin: 0;
}

.eh-account-card__actions {
	display: grid;
	gap: 0.65rem;
	padding-bottom: 1.25rem;
}

.eh-account-card__social {
	text-align: center;
	padding-top: 1rem;
	border-top: 1px solid var(--eh-border);
}

.eh-account-card__social-label {
	font-size: 0.8rem;
	color: var(--eh-text-muted);
	display: block;
	margin-bottom: 0.75rem;
}

.eh-account-card__social-buttons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

/* Buttons */
.eh-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.25rem;
	border-radius: var(--eh-radius-sm);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background var(--eh-transition), border-color var(--eh-transition);
}

.eh-button--primary {
	background: var(--eh-primary) !important;
	color: #fff !important;
	border-color: var(--eh-primary) !important;
}

.eh-button--primary:hover {
	background: #082d4f !important;
}

.eh-button--outline {
	background: transparent;
	color: var(--eh-text);
	border-color: var(--eh-border);
}

.eh-button--outline:hover {
	border-color: var(--eh-primary);
	color: var(--eh-primary);
}

.eh-button--full {
	width: 100%;
}

/* Mobile: account as bottom sheet */
@media (max-width: 767px) {
	.eh-panel__content--account {
		position: absolute;
		left: 0.5rem;
		right: 0.5rem;
		top: auto;
		bottom: 0.5rem;
		width: auto;
		border-radius: 1.25rem 1.25rem 0 0;
		transform: translateY(100%);
	}

	.eh-panel.is-open .eh-panel__content--account {
		transform: translateY(0);
	}
}
