/* ==========================================================================
   header.css — announcement bar + floating pill navbar (Figma-matched)
   Colors come from tokens.css (light/dark aware).
   ========================================================================== */

/* ---- Announcement bar (Figma spec) -------------------------------------- */
.adacorn-announce {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 10px 44px;
	background: linear-gradient( 90deg, var(--ada-announce-from) 0%, var(--ada-announce-to) 50% );
	color: var(--ada-announce-text);
}

.adacorn-announce.is-dismissed { display: none; }

.adacorn-announce__text {
	margin: 0;
	font-family: var(--ada-font);
	font-weight: 500;
	font-size: 12px;
	line-height: 16px;
	color: var(--ada-announce-text);
}

.adacorn-announce__close {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY( -50% );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 2px;
	border: 0;
	border-radius: 96px;
	background: transparent;
	color: #ffffff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.adacorn-announce__close:hover { background: rgba( 255, 255, 255, 0.16 ); }
.adacorn-announce__close svg { display: block; }

/* ---- Floating navbar wrapper -------------------------------------------- */
.ada-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 16px;
}

.ada-nav__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	max-width: var(--ada-container);
	margin-inline: auto;
}

/* ---- Shared pill -------------------------------------------------------- */
.ada-pill {
	display: flex;
	align-items: center;
	background: var(--ada-pill-bg);
	border-radius: 999px;
	box-shadow: var(--ada-pill-shadow);
}

.ada-nav__right {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* ---- Brand pill (logo + socials) ---------------------------------------- */
.ada-brandpill { padding: 8px 8px 8px 22px; gap: 14px; }

.ada-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.ada-brand__mark { color: var(--ada-brand-green); display: inline-flex; }
.ada-brand__mark svg { display: block; }

.ada-brand__word {
	font-family: var(--ada-logo-font);
	font-weight: 700;
	font-size: 20px;
	line-height: 24px;
	letter-spacing: -0.01em;
}

.ada-brand__ad    { color: var(--ada-logo-ink); }
.ada-brand__acorn { color: var(--ada-logo-ink-2); }

/* Logo — same asset in both themes for now (dark variant to come later). */
.ada-logo-img { display: block; height: 34px; width: auto; }

.ada-socials { display: inline-flex; align-items: center; gap: 4px; }

.ada-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 37px;
	height: 37px;
	border-radius: 999px;
	color: var(--ada-social-ink);
	transition: background-color 0.15s ease;
}

.ada-social:hover { background: var(--ada-social-active); color: var(--ada-social-ink); }
.ada-social.is-active { background: var(--ada-social-active); }
.ada-social svg { display: block; width: 15px; height: 15px; }

/* ---- Nav links pill ----------------------------------------------------- */
.ada-navlinks { padding: 0 8px; gap: 2px; }

/* The in-menu CTA only exists in the mobile dropdown. Selector matches the
   specificity of `.ada-navlinks a` so it actually wins on desktop. */
.ada-navlinks a.ada-navlinks__cta { display: none; }

.ada-navlinks a {
	display: inline-flex;
	align-items: center;
	height: 52px;
	padding: 0 14px;
	font-family: var(--ada-nav-font);
	font-weight: 500;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ada-nav-ink);
	border-radius: 999px;
}

.ada-navlinks a:hover { color: var(--ada-nav-ink); background: var(--ada-social-active); }

/* ---- Theme toggle pill (circular) --------------------------------------- */
.ada-toggle {
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	cursor: pointer;
	color: var(--ada-nav-ink);
}

.ada-toggle svg { display: block; width: 20px; height: 20px; }
.ada-toggle__sun { display: none; }
.ada-toggle__moon { display: block; }
:root[data-theme="dark"] .ada-toggle__sun { display: block; }
:root[data-theme="dark"] .ada-toggle__moon { display: none; }

/* ---- CTA pill (login + button) ------------------------------------------ */
.ada-ctapill { padding: 7px 7px 7px 22px; gap: 15px; }

.ada-login {
	font-family: var(--ada-nav-font);
	font-weight: 500;
	font-size: 12px;
	line-height: 1;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ada-nav-ink);
	white-space: nowrap;
}

.ada-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 37.5px;
	padding: 6px 12px;
	background: var(--ada-cta);
	color: var(--ada-cta-ink);
	border: 1px solid var(--ada-cta-border);
	border-radius: 8px;
	box-shadow: 0 1px 5px rgba( 27, 77, 255, 0.16 ),
		inset 0 1px 3px rgba( 255, 255, 255, 0.32 ),
		inset 0 4px 6px rgba( 255, 255, 255, 0.06 );
	font-family: var(--ada-font);
	font-weight: 500;
	font-size: 14px;
	line-height: 20px;
	letter-spacing: -0.2px;
	white-space: nowrap;
}

.ada-cta:hover { background: var(--ada-cta-hover); color: var(--ada-cta-ink); }
.ada-cta__arrow { opacity: 0.64; }
.ada-cta__arrow svg { display: block; width: 20px; height: auto; }

/* ---- Mobile burger ------------------------------------------------------ */
.ada-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 52px;
	height: 52px;
	padding: 0 16px;
	border: 0;
	cursor: pointer;
	color: var(--ada-nav-ink);
}

.ada-burger__bar {
	display: block;
	height: 2px;
	width: 100%;
	background: currentColor;
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
	.ada-socials { display: none; } /* keep the brand pill compact on tablets */
}

@media (max-width: 900px) {
	/* Burger is a bare button — give it a transparent background so it doesn't
	   render as the browser's default grey/white box. */
	.ada-burger { display: flex; background: transparent; }

	/* Top bar on mobile = logo + theme toggle + burger. The "Try for free"
	   CTA pill moves out of the bar and into the dropdown menu instead. */
	.ada-ctapill { display: none; }

	/* Collapse the nav-links pill into a dropdown panel. */
	.ada-navlinks {
		position: absolute;
		top: calc(100% + 8px);
		right: 16px;
		left: 16px;
		flex-direction: column;
		align-items: stretch;
		padding: 8px;
		border-radius: 20px;
		max-height: 0;
		overflow: hidden;
		box-shadow: var(--ada-pill-shadow);
		opacity: 0;
		pointer-events: none;
		transition: max-height 0.25s ease, opacity 0.2s ease;
	}

	.ada-nav.is-nav-open .ada-navlinks {
		max-height: 70vh;
		opacity: 1;
		pointer-events: auto;
	}

	.ada-navlinks a {
		width: 100%;
		height: auto;
		padding: 14px 16px;
	}

	/* The in-menu "Try for free" CTA — a green button, not a plain nav link. */
	.ada-navlinks a.ada-navlinks__cta {
		display: inline-flex;
		justify-content: center;
		width: 100%;
		height: 44px;
		margin-top: 6px;
		padding: 6px 12px;
		border-radius: 8px;
		color: var(--ada-cta-ink);
		font-size: 14px;
		text-transform: none;
		letter-spacing: -0.2px;
	}
	.ada-navlinks .ada-navlinks__cta:hover { background: var(--ada-cta-hover); color: var(--ada-cta-ink); }

	.ada-login { display: none; }

	.ada-nav.is-nav-open .ada-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.ada-nav.is-nav-open .ada-burger__bar:nth-child(2) { opacity: 0; }
	.ada-nav.is-nav-open .ada-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 480px) {
	.ada-cta { font-size: 13px; padding: 6px 10px; }
	.ada-brand__word { font-size: 18px; }
}
