/**
 * Pill header only. Logo lives inside the navbar.
 * Topbar (launch bar) is moved into #cp-topbar-slot, above this header.
 */

.cp-topbar-slot {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

.cp-topbar-slot:empty {
	display: none;
}

/* Topbar full-bleed: sem sobra lateral do container Elementor/tema. */
.cp-topbar-slot,
.cp-topbar-slot > *,
.ecw-launch-chrome {
	width: 100% !important;
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	box-sizing: border-box;
}

.cp-topbar-slot .elementor-widget-container,
.cp-topbar-slot .e-con,
.cp-topbar-slot .e-con-inner,
.cp-topbar-slot .elementor-container,
.cp-topbar-slot .elementor-column,
.cp-topbar-slot .elementor-column-wrap,
.cp-topbar-slot .elementor-widget-wrap,
.cp-topbar-slot .elementor-widget,
.ecw-launch-chrome .elementor-widget-container,
.ecw-launch-chrome .e-con-inner,
.ecw-launch-chrome .elementor-container {
	width: 100% !important;
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	box-sizing: border-box;
}

.cp-header {
	position: relative;
	z-index: 1100;
	isolation: isolate;
	font-family: var(--compilart-font, "Montserrat", system-ui, sans-serif);
}

.cp-header.is-sticky {
	position: relative;
	top: auto;
}

.cp-header__bar {
	padding: 14px 0 16px;
	background: transparent;
}

.cp-navbar {
	background: var(--compilart-surface, #fff);
	display: grid;
	grid-template-columns: minmax(88px, auto) 1fr minmax(88px, auto);
	align-items: center;
	column-gap: 12px;
	padding: 8px 12px 8px 16px;
	border-radius: 50px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
	width: 100%;
	border: 1px solid #eef0f3;
	position: relative;
	z-index: 1102;
}

.cp-navbar__brand {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	padding-right: 8px;
}

.cp-navbar__brand .custom-logo-link,
.cp-navbar__brand a {
	display: inline-flex;
	align-items: center;
}

.cp-navbar__brand img {
	max-height: 40px;
	width: auto;
	display: block;
}

.cp-brand__name {
	font-weight: 800;
	font-size: 0.95rem;
	color: var(--compilart-title, #0d0d0d);
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.cp-nav {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 22px;
	align-items: center;
	justify-content: center;
	justify-self: center;
	width: 100%;
}

.cp-nav li {
	margin: 0;
	position: relative;
}

.cp-nav a {
	color: #333;
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	position: relative;
	padding-bottom: 5px;
	transition: color 0.3s ease;
}

.cp-nav a:hover,
.cp-nav .current-menu-item > a,
.cp-nav .current-menu-ancestor > a {
	color: var(--compilart-red, #e41118);
}

.cp-nav .current-menu-item > a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 100%;
	height: 3px;
	background: var(--compilart-red, #e41118);
	border-radius: 2px;
}

.cp-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 16px;
	box-shadow: var(--compilart-shadow, 0 12px 32px rgba(0, 0, 0, 0.1));
	padding: 10px 0;
	z-index: 20;
}

.cp-nav li:hover > .sub-menu,
.cp-nav li:focus-within > .sub-menu {
	display: block;
}

.cp-nav .sub-menu a {
	display: block;
	padding: 10px 16px;
	font-size: 13px;
}

.cp-nav .sub-menu a::after {
	display: none;
}

/* Mega panel — Compilart Principal. Columns come from each item in Aparência → Menus. */
.cp-nav > li.cp-mega {
	position: static;
}

.cp-nav > li.cp-mega > .cp-mega__panel {
	display: none;
	position: absolute;
	left: 8px;
	right: 8px;
	top: calc(100% - 12px);
	z-index: 40;
	padding-top: 12px;
}

.cp-nav > li.cp-mega:hover > .cp-mega__panel,
.cp-nav > li.cp-mega:focus-within > .cp-mega__panel {
	display: block;
}

.cp-mega__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
	background: #fff;
	border: 1px solid #eef0f3;
	border-radius: 16px;
	box-shadow: var(--compilart-shadow, 0 12px 32px rgba(0, 0, 0, 0.1));
	overflow: hidden;
}

.cp-mega__col {
	min-width: 0;
	padding: 16px 18px 18px;
}

.cp-mega__col + .cp-mega__col,
.cp-mega__col.has-divider {
	border-left: 1px solid #eef0f3;
}

.cp-mega__label {
	display: block;
	margin: 0 0 8px;
	color: #111;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.35;
}

.cp-nav .cp-mega__panel a {
	padding-bottom: 0;
	font-size: 13px;
	font-weight: 600;
}

.cp-nav .cp-mega__panel .cp-mega__label {
	font-weight: 800;
	color: #111;
}

.cp-nav .cp-mega__panel a:hover,
.cp-nav .cp-mega__panel .current-menu-item > a,
.cp-nav .cp-mega__col.current-menu-item > .cp-mega__label,
.cp-nav .cp-mega__col.current-menu-ancestor > .cp-mega__label {
	color: var(--compilart-red, #e41118);
}

.cp-nav .cp-mega__panel a::after {
	display: none;
}

.cp-mega__note {
	margin: 0 0 10px;
	color: #6b7280;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.45;
}

.cp-mega__links {
	list-style: none;
	margin: 0;
	padding: 0;
}

.cp-mega__links a {
	display: block;
	padding: 6px 0;
	line-height: 1.35;
	color: #3f3f46;
}

.cp-mega__card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	color: inherit;
	text-decoration: none;
}

.cp-mega__card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 12px;
}

.cp-mega__card .cp-mega__label {
	margin: 0;
}

.cp-navbar__right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	flex-shrink: 0;
	position: relative;
	z-index: 1103;
}

.cp-btn-client {
	background: var(--compilart-red, #e41118);
	color: #fff;
	text-decoration: none;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 12px 26px;
	border-radius: 30px;
	letter-spacing: 0.5px;
	transition: background-color 0.3s ease;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	cursor: pointer;
	font-family: inherit;
	-webkit-tap-highlight-color: transparent;
}

.cp-btn-client:hover,
.cp-btn-client:focus {
	background: var(--compilart-red-dark, #c40e14);
	color: #fff;
	text-decoration: none;
}

.cp-btn-client:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--compilart-red, #e41118);
}

.cp-btn-client__short {
	display: none;
}

.cp-btn-install {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 10px 14px;
	border-radius: 30px;
	cursor: pointer;
	white-space: nowrap;
	font-family: inherit;
	line-height: 1;
}

.cp-btn-install:hover,
.cp-btn-install:focus {
	color: var(--compilart-red, #e41118);
	border-color: var(--compilart-red, #e41118);
}

.cp-install-note {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(20rem, calc(100vw - 2rem));
	padding: 12px 14px;
	border-radius: 16px;
	background: #fff;
	color: #27272a;
	border: 1px solid #e4e4e7;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.45;
	text-transform: none;
	letter-spacing: 0;
	z-index: 1200;
}

.cp-menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px;
	margin: 0;
	z-index: 1104;
	position: relative;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	pointer-events: auto;
}

.cp-menu-toggle__bar {
	width: 22px;
	height: 2px;
	background: #333;
	border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease;
	display: block;
	pointer-events: none;
}

.cp-menu-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 1090;
	touch-action: manipulation;
}

.cp-menu-overlay.is-open {
	display: block;
}

html.cp-nav-lock {
	overflow: hidden;
}

@media (max-width: 992px) {
	.cp-menu-toggle,
	.cp-menu-overlay {
		display: none !important;
	}

	.cp-navbar {
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
	}

	.cp-header .cp-nav {
		display: none !important;
	}

	.cp-navbar__brand {
		min-width: 0;
	}

	.cp-navbar__brand img {
		height: 44px;
		max-height: 44px;
		width: auto;
		max-width: none;
	}

	.cp-navbar__right {
		min-width: 0;
		gap: 8px;
	}

	.cp-btn-install {
		display: none;
	}
}

@media (max-width: 480px) {
	.cp-navbar {
		padding: 8px 8px 8px 14px;
	}

	.cp-navbar__brand img {
		height: 40px;
		max-height: 40px;
	}

	.cp-btn-client {
		padding: 10px 14px;
		font-size: 11px;
	}

	.cp-btn-client__full {
		display: none;
	}

	.cp-btn-client__short {
		display: inline;
	}

	.cp-btn-install {
		padding: 8px 10px;
		font-size: 10px;
	}
}

body.admin-bar .cp-header.is-sticky {
	top: auto;
}

/* App tab bar — only on mobile */
.cp-tabbar {
	display: none;
}

@media (max-width: 992px) {
	:root {
		--cp-tabbar-h: 76px;
	}

	.cp-tabbar {
		--item: 42px;
		--gap: 2px;
		--pad: 4px;
		--icon-size: 22px;
		--pill-pad: 12px;
		--dur: 480ms;
		--ease: cubic-bezier(0.22, 1, 0.36, 1);
		display: block;
		position: fixed;
		left: 50%;
		right: auto;
		bottom: calc(10px + env(safe-area-inset-bottom, 0px));
		z-index: 1200;
		width: max-content;
		max-width: calc(100vw - 16px);
		padding: var(--pad);
		border-radius: 999px;
		background: #000000;
		box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
		transform: translateX(-50%);
		font-family: var(--compilart-font, "Montserrat", system-ui, sans-serif);
		line-height: 1;
		-webkit-font-smoothing: antialiased;
	}

	.cp-tabbar__pill {
		position: absolute;
		left: 0;
		top: var(--pad);
		z-index: 1;
		width: var(--pill-w, var(--item));
		height: var(--item);
		border-radius: 999px;
		background: #db1f2e;
		transform: translate3d(var(--pill-x, var(--pad)), 0, 0);
		transition:
			transform var(--dur) var(--ease),
			width var(--dur) var(--ease);
		pointer-events: none;
	}

	.cp-tabbar.is-idle .cp-tabbar__pill,
	.cp-tabbar.is-instant .cp-tabbar__pill,
	.cp-tabbar.is-instant .cp-tabbar__label {
		transition: none;
	}

	.cp-tabbar.is-idle .cp-tabbar__pill {
		opacity: 0;
	}

	.cp-tabbar__list {
		position: relative;
		z-index: 2;
		display: flex;
		align-items: center;
		gap: var(--gap);
		margin: 0;
		padding: 0;
		list-style: none;
	}

	.cp-tabbar__slot {
		margin: 0;
		padding: 0;
	}

	.cp-tabbar__item {
		display: flex;
		align-items: center;
		height: var(--item);
		color: #ffffff;
		border-radius: 999px;
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	.cp-tabbar__item:hover,
	.cp-tabbar__item:focus,
	.cp-tabbar__item:active {
		color: #ffffff;
		text-decoration: none;
	}

	.cp-tabbar__icon {
		display: grid;
		flex: 0 0 var(--item);
		place-items: center;
		width: var(--item);
		height: var(--item);
	}

	.cp-tabbar__icon svg {
		width: var(--icon-size);
		height: var(--icon-size);
		max-width: none;
		flex-shrink: 0;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.8;
	}

	.cp-tabbar__sheet {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(var(--cp-tabbar-h) + env(safe-area-inset-bottom, 0px) + 6px);
		z-index: 1210;
		display: grid;
		gap: 2px;
		max-height: min(50vh, 320px);
		overflow: auto;
		padding: 8px;
		border-radius: 18px;
		background: #fff;
		border: 1px solid #eef0f3;
		box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
	}

	.cp-tabbar__sheet[hidden] {
		display: none;
	}

	.cp-tabbar__sheet a {
		display: block;
		padding: 12px 14px;
		border-radius: 12px;
		color: #18181b;
		font-size: 14px;
		font-weight: 700;
		line-height: 1.3;
		text-decoration: none;
	}

	.cp-tabbar__sheet a:hover,
	.cp-tabbar__sheet a:focus {
		background: #f4f4f5;
		color: var(--compilart-red, #e41118);
	}

	.cp-tabbar__label {
		display: block;
		box-sizing: border-box;
		overflow: hidden;
		max-width: 0;
		opacity: 0;
		padding-inline-end: 0;
		font-size: 14px;
		font-weight: 600;
		letter-spacing: -0.01em;
		white-space: nowrap;
		color: #ffffff;
		transition:
			max-width var(--dur) var(--ease),
			opacity calc(var(--dur) * 0.55) ease,
			padding var(--dur) var(--ease);
	}

	.cp-tabbar__item.is-active .cp-tabbar__label {
		max-width: calc(var(--label-max, 8em) + var(--pill-pad));
		padding-inline-end: var(--pill-pad);
		opacity: 1;
	}

	body.cp-has-tabbar {
		padding-bottom: calc(var(--cp-tabbar-h) + env(safe-area-inset-bottom, 0px));
	}

	html body #cs-footer-chat .cs-chat-fab {
		bottom: calc(var(--cp-tabbar-h) + env(safe-area-inset-bottom, 0px) + 8px) !important;
		right: 16px !important;
	}

	html body #cs-footer-chat .cs-chat-panel {
		bottom: calc(var(--cp-tabbar-h) + env(safe-area-inset-bottom, 0px) + 64px) !important;
	}
}
