/* ============================================================
   Serenity Dark Pill Header — dark-pill-header.css  v1.3.0
   ============================================================ */

/* Portal container — appended to body, zero footprint */
[id^="dph-portal-"] {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	box-sizing: border-box;
	z-index: 9999;
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: flex-start;
	padding: 16px 24px;
	pointer-events: none;
	background: transparent;
	/* Prevent Elementor parent containers from collapsing this */
	min-width: 0;
}

/* Outer wrap inside portal */
[id^="dph-portal-"] .dph-wrap {
	display: contents;
}

/* The pill */
[id^="dph-portal-"] .dph-pill {
	pointer-events: all;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 0;
	background: #111111;
	border: 0.5px solid rgba(255, 255, 255, 0.1);
	border-radius: 100px;
	padding: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
	position: relative;
	/* Force centering even if flex child has unexpected sizing */
	margin-left: auto;
	margin-right: auto;
	/* Prevent pill from stretching to full width */
	width: fit-content;
	max-width: calc(100vw - 48px);
}

/* Avatar */
[id^="dph-portal-"] .dph-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	margin-right: 8px;
	background: #333;
	display: flex;
	align-items: center;
	justify-content: center;
}

[id^="dph-portal-"] .dph-avatar img {
	width: 100%; height: 100%; object-fit: cover; display: block;
}

[id^="dph-portal-"] .dph-avatar-initials {
	font-size: 13px; font-weight: 500; color: #aaa; line-height: 1;
}

/* Nav */
[id^="dph-portal-"] .dph-nav {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 8px;
}

[id^="dph-portal-"] .dph-nav a {
	font-size: 14px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 100px;
	transition: color 0.2s, background 0.2s;
	white-space: nowrap;
}

[id^="dph-portal-"] .dph-nav a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.07);
}

[id^="dph-portal-"] .dph-nav a.active {
	color: #fff;
}

/* Hamburger */
[id^="dph-portal-"] .dph-hamburger {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 10px 14px;
	cursor: pointer;
	background: none;
	border: none;
	margin-left: 4px;
	pointer-events: all;
	z-index: 10;
	position: relative;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

[id^="dph-portal-"] .dph-hamburger span {
	display: block;
	width: 20px;
	height: 2px;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 2px;
	transition: all 0.3s;
	pointer-events: none;
}

/* Contact wrap */
[id^="dph-portal-"] .dph-contact-wrap {
	position: relative;
	margin-left: 4px;
}

/* Contact button */
[id^="dph-portal-"] .dph-contact-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 500;
	color: #111;
	background: #ffffff;
	border: none;
	padding: 10px 22px;
	border-radius: 100px;
	cursor: pointer;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s, transform 0.15s, color 0.2s;
	font-family: inherit;
	line-height: 1.4;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	min-height: 44px;
	pointer-events: all;
	z-index: 5;
	position: relative;
}

[id^="dph-portal-"] .dph-contact-btn:hover {
	background: #e8e8e8;
	transform: scale(0.98);
}

[id^="dph-portal-"] .dph-contact-btn:active {
	transform: scale(0.95);
}

[id^="dph-portal-"] .dph-chevron {
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

[id^="dph-portal-"] .dph-contact-wrap.is-open .dph-chevron {
	transform: rotate(180deg);
}

/* Dropdown */
[id^="dph-portal-"] .dph-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: #111111;
	border: 0.5px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	min-width: 160px;
	padding: 6px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px) scale(0.97);
	transform-origin: top right;
	transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
	z-index: 100;
}

[id^="dph-portal-"] .dph-contact-wrap.is-open .dph-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

[id^="dph-portal-"] .dph-dropdown a {
	display: block;
	font-size: 14px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	padding: 10px 16px;
	border-radius: 10px;
	white-space: nowrap;
	transition: color 0.15s, background 0.15s;
}

[id^="dph-portal-"] .dph-dropdown a:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.07);
}

/* Mobile nav open */
[id^="dph-portal-"] .dph-nav.dph-nav--mobile-open {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	position: fixed;
	top: var(--dph-mobile-menu-top, 84px);
	left: 16px;
	right: 16px;
	width: auto;
	max-width: 340px;
	margin-left: auto;
	margin-right: auto;
	background: #111;
	border-radius: 16px;
	padding: 8px;
	border: 0.5px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
	z-index: 100000;
}

[id^="dph-portal-"] .dph-nav.dph-nav--mobile-open a {
	width: 100%;
	border-radius: 10px;
	box-sizing: border-box;
	text-align: left;
}

/* Desktop: always show nav, hide hamburger */
@media (min-width: 1025px) {
	[id^="dph-portal-"] .dph-nav {
		display: flex !important;
		flex-direction: row;
		position: static;
		background: transparent;
		border: 0;
		padding: 0 8px;
	}

	[id^="dph-portal-"] .dph-hamburger {
		display: none !important;
	}
}

/* Tablet and Mobile */
@media (max-width: 1024px) {
	[id^="dph-portal-"] {
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		max-width: none !important;
		box-sizing: border-box !important;
		justify-content: center !important;
		align-items: flex-start !important;
		padding: 16px !important;
		overflow: visible !important;
	}

	[id^="dph-portal-"] .dph-pill {
		margin-left: auto !important;
		margin-right: auto !important;
		width: fit-content !important;
		max-width: calc(100vw - 32px) !important;
	}

	[id^="dph-portal-"] .dph-nav      { display: none; }
	[id^="dph-portal-"] .dph-hamburger { display: flex; }
}

@media (max-width: 600px) {
	[id^="dph-portal-"] {
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	[id^="dph-portal-"] .dph-pill {
		max-width: calc(100vw - 24px) !important;
		padding: 6px !important;
	}

	[id^="dph-portal-"] .dph-avatar {
		width: 34px;
		height: 34px;
		margin-right: 6px;
	}

	[id^="dph-portal-"] .dph-contact-btn { padding: 8px 16px; font-size: 13px; }

	[id^="dph-portal-"] .dph-nav.dph-nav--mobile-open {
		left: 12px;
		right: 12px;
		max-width: 320px;
	}

	[id^="dph-portal-"] .dph-dropdown { right: auto; left: 0; top: calc(100% + 8px); min-width: 140px; }
}

/* No horizontal scroll when mobile menu open */
html.dph-menu-open,
html.dph-menu-open body,
body.dph-menu-open {
	overflow-x: hidden !important;
	max-width: 100% !important;
}

/* Editor placeholder styling */
.dph-editor-placeholder {
	min-height: 48px;
}
