/*
 * "Моят профил" — header icon link + the portal page (template-profile-portal.php).
 * Plain CSS, no build (same model as header-scroll.css).
 */

/* The account icons were <button>s; they are links now. */
a.user-icon-button,
a.side-menu-header-icon {
	text-decoration: none;
}

.side-menu-header-icons a.side-menu-header-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	transition: opacity 0.2s ease;
}

.side-menu-header-icons a.side-menu-header-icon:hover {
	opacity: 0.7;
}

/* BG / EN in the side-menu header (template-parts/navigation/side-menu.php).
   Text only, no flags. Utility chrome ⇒ no yellow: active = primary, bold;
   the other = muted primary, full on hover. */
.zd-lang-switch {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1;
	letter-spacing: 0.04em;
}

.zd-lang-switch__item {
	color: color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s ease;
}

.zd-lang-switch__item + .zd-lang-switch__item {
	padding-left: 0.5rem;
	border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--primary) 20%, transparent);
}

a.zd-lang-switch__item:hover,
a.zd-lang-switch__item:focus-visible {
	color: var(--wp--preset--color--primary);
}

.zd-lang-switch__item.is-active {
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* The phone drawer is 320px: with the switch the header needs tighter gaps,
   and nothing in it may shrink (the search icon was squeezed to 16px). */
.side-menu-drawer .side-menu-header {
	gap: 0.75rem;
}

.side-menu-drawer .side-menu-header-actions > *,
.side-menu-drawer .side-menu-header-icons > * {
	flex-shrink: 0;
}

@media (max-width: 767px) {
	.side-menu-drawer .side-menu-header .side-menu-header-actions {
		gap: 1.5rem;
	}

	.side-menu-drawer .side-menu-header .side-menu-header-actions .side-menu-header-icons {
		gap: 1rem;
	}
}

/* Signed in: the person icon becomes a yellow badge with the initial
   (zdraveto_account_icon_inner()). Same size as the icon it replaces; brand
   yellow reads on both the dark and the white header. */
.zd-user-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-width: 1.75rem;
	min-height: 1.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--primary);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
}

.zd-user-badge svg path {
	fill: var(--wp--preset--color--primary);
}

/* Portal page: header on top, iframe fills the rest, no footer, no page scroll.
   The page itself uses the white "inverse_header" (ACF field on the page). */
html:has(body.zd-profile-portal),
body.zd-profile-portal {
	height: 100%;
	overflow: hidden;
}

body.zd-profile-portal #page {
	display: flex;
	flex-direction: column;
	height: 100vh;
	height: 100dvh;
}

body.zd-profile-portal #page > .site-header {
	position: relative;
	flex: 0 0 auto;
	transform: none;
}

body.zd-profile-portal #content {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
	padding: 0;
	margin: 0;
}

body.zd-profile-portal .zd-profile-portal__frame {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	border: 0;
}

body.zd-profile-portal #colophon {
	display: none;
}
