/**
 * SDFWA Auth — account button. Intentionally minimal so it inherits the
 * surrounding theme/Elementor typography and colors. Override freely in your
 * theme; all classes are namespaced with `sdfwa-account`.
 */

.sdfwa-account {
	display: inline-flex;
	align-items: center;
	font: inherit;
	line-height: 1.2;
}

/* Keep the placeholder collapsed until account.js renders into it. */
.sdfwa-account[hidden] {
	display: none;
}

.sdfwa-account__link,
.sdfwa-account__name,
.sdfwa-account__signout {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.sdfwa-account__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	text-decoration: none;
}

.sdfwa-account__name {
	background: none;
	border: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
}

/* Icon + label parts. Visibility is driven per-breakpoint by the widget's
   "Text label" control, which sets --sdfwa-label / --sdfwa-icon-si on the
   wrapper (see class-elementor-account-widget.php). Fallbacks here reproduce
   the default desktop layout when no control CSS is present. */
.sdfwa-account__icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
}

.sdfwa-account__icon svg {
	width: 1.1em;
	height: 1.1em;
	fill: currentColor;
}

.sdfwa-account__label {
	display: var(--sdfwa-label, inline-flex);
	align-items: center;
}

/* Signed-out: the icon is always shown (desktop: icon + text; mobile: icon). */
.sdfwa-account__link .sdfwa-account__icon {
	display: inline-flex;
}

/* Signed-in: the icon is the inverse of the label — hidden on desktop (where the
   first name shows), shown on mobile (icon only). */
.sdfwa-account__user .sdfwa-account__icon {
	display: var(--sdfwa-icon-si, none);
}

.sdfwa-account__name::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-0.1em);
	opacity: 0.7;
}

.sdfwa-account__user {
	position: relative;
	display: inline-flex;
}

.sdfwa-account__menu {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 0.4em;
	min-width: 10em;
	background: #fff;
	color: #1a1a1a;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	padding: 0.35em;
	z-index: 1000;
}

.sdfwa-account__menu[hidden] {
	display: none;
}

.sdfwa-account__signout {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: 0;
	padding: 0.5em 0.6em;
	border-radius: 4px;
	color: inherit;
}

.sdfwa-account__signout:hover,
.sdfwa-account__signout:focus {
	background: rgba(0, 0, 0, 0.06);
}
