/* ═══════════════════════════════════════════════════════════════════════════
   Lithops Header Footer Editor — Public Header Styles  (v1.7.3)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base ──────────────────────────────────────────────────────────────── */
#lhfe-site-header {
	width: 100%;
	box-sizing: border-box;
	background-color: var(--lhfe-bg, #fff);
	border-bottom: var(--lhfe-border, none);
}

/* ── Цвет ссылок через CSS-переменную ──────────────────────────────────── */
#lhfe-site-header .lhfe-nav-link,
#lhfe-site-header .lhfe-brand {
	color: var(--lhfe-link, inherit) !important;
}

/* ── Логотип ────────────────────────────────────────────────────────────── */
.lhfe-logo {
	width: var(--lhfe-logo-w, auto);
	height: var(--lhfe-logo-h, auto);
	display: block;
	object-fit: contain;
	margin: 5px 15px 5px 0;
}

/* ── Активная ссылка навигации ──────────────────────────────────────────── */
.lhfe-nav-link.fw-bold {
	font-weight: 700 !important;
}

/* ── Header inner layout ─────────────────────────────────────────────── */
.lhfe-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

/* ── Nav collapse ────────────────────────────────────────────────────── */
.lhfe-nav-collapse {
	display: flex;
	align-items: center;
	flex: 1;
}

.lhfe-nav-list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.lhfe-nav-link {
	padding: 8px 12px;
	text-decoration: none;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.lhfe-nav-link:hover {
	opacity: 0.75;
}

/* ── Burger button ───────────────────────────────────────────────────── */
.lhfe-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	margin-left: auto;
	z-index: 10;
}

.lhfe-burger-line {
	display: block;
	width: 24px;
	height: 2px;
	background-color: var(--lhfe-link, #333);
	transition:
		transform 0.3s ease,
		opacity 0.3s ease;
	border-radius: 1px;
}

/* Burger → X animation */
.lhfe-nav-open .lhfe-burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.lhfe-nav-open .lhfe-burger-line:nth-child(2) {
	opacity: 0;
}
.lhfe-nav-open .lhfe-burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ── Account dropdown ────────────────────────────────────────────────── */
.lhfe-account {
	position: relative;
	margin-left: 4px;
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.lhfe-account-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 4px 4px 8px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--lhfe-link, inherit);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.18s ease;
	white-space: nowrap;
}

.lhfe-account-trigger:hover,
.lhfe-account-trigger:focus-visible {
	background: rgba(128,128,128,0.08);
	text-decoration: none;
	color: var(--lhfe-link, inherit);
}

.lhfe-account-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: linear-gradient(135deg, #3f63cf 0%, #2d4da6 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.lhfe-account-name {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lhfe-account-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--lhfe-link, inherit);
	cursor: pointer;
	transition: background-color 0.18s ease;
}

.lhfe-account-toggle:hover,
.lhfe-account-toggle:focus-visible {
	background: rgba(128,128,128,0.08);
}

.lhfe-account-chevron {
	flex-shrink: 0;
	transition: transform 0.18s ease;
	opacity: 0.6;
}

.lhfe-account-toggle[aria-expanded="true"] .lhfe-account-chevron {
	transform: rotate(180deg);
}

.lhfe-account-menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid #d8e1ef;
	border-radius: 12px;
	box-shadow: 0 12px 36px rgba(8,24,56,0.14);
	padding: 5px;
	display: none;
	z-index: 200;
}

.lhfe-account-menu.lhfe-account-open {
	display: block;
}

.lhfe-account-link {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: #1f2d4d;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.14s ease;
}

.lhfe-account-link:hover {
	background: #f4f7fd;
	text-decoration: none;
	color: #1f2d4d;
}

.lhfe-account-link--danger {
	color: #c4554b;
}

.lhfe-account-link--danger:hover {
	background: rgba(196,85,75,0.06);
	color: #c4554b;
}

.lhfe-account-divider {
	height: 1px;
	background: #e7edf7;
	margin: 4px 6px;
}

/* Reset button-specific styles for the logout trigger so it looks identical
 * to the anchor-style Profile link above it. */
.lhfe-account button.lhfe-account-link {
	width: 100%;
	text-align: left;
	border: 0;
	background: transparent;
	font: inherit;
	cursor: pointer;
}

/* Menu offset below the trigger. Open/close is click-only — the chevron
 * toggle controls visibility, and an outside click closes the menu (see
 * the JS in render_account_dropdown()). */
.lhfe-account-menu {
	top: 100%;
	margin-top: 6px;
}

/* ── Confirm modal (logout confirmation) ─────────────────────────────── */

.lhfe-confirm[hidden] {
	display: none;
}

.lhfe-confirm {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.lhfe-confirm-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 24, 56, 0.45);
	cursor: pointer;
}

.lhfe-confirm-dialog {
	position: relative;
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(8, 24, 56, 0.22);
	padding: 24px;
}

.lhfe-confirm-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	color: #1f2d4d;
}

.lhfe-confirm-desc {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.5;
	color: #6c7891;
}

.lhfe-confirm-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.lhfe-confirm-btn {
	cursor: pointer;
	border-radius: 10px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	line-height: 1.2;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.lhfe-confirm-btn--ghost {
	background: #fff;
	border: 1px solid #d8e1ef;
	color: #1f2d4d;
}

.lhfe-confirm-btn--ghost:hover {
	background: #f4f7fd;
}

.lhfe-confirm-btn--danger {
	background: #c4554b;
	border: 1px solid #c4554b;
	color: #fff;
}

.lhfe-confirm-btn--danger:hover {
	background: #a44540;
	border-color: #a44540;
}

/* ── Desktop (≥ 992px) ────────────────────────────────────────────────── */
@media (min-width: 992px) {
	.lhfe-header-inner {
		flex-wrap: nowrap;
	}
	.lhfe-burger {
		display: none !important;
	}
}

/* ── Tablet + Mobile (< 992px) ────────────────────────────────────────── */
@media (max-width: 991.98px) {
	.lhfe-burger {
		display: flex;
	}

	.lhfe-nav-collapse {
		flex-basis: 100%;
		flex-direction: column;
		align-items: stretch;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.35s ease;
	}

	.lhfe-nav-open .lhfe-nav-collapse {
		max-height: 600px;
	}

	.lhfe-nav-list {
		flex-direction: column;
		padding: 12px 0;
	}

	.lhfe-nav-link {
		padding: 10px 0;
		display: block;
	}

	.lhfe-auth-buttons {
		padding: 12px 0;
		border-top: 1px solid rgba(128, 128, 128, 0.2);
	}

	.lhfe-account-name {
		display: none;
	}

	.lhfe-account-trigger {
		padding: 3px;
		border-radius: 8px;
	}

	.lhfe-account-menu {
		right: auto;
		left: 0;
	}
}
