/**
 * OptConnect header (PR 2.1).
 *
 * Dark sticky bar with a white logo, the `optconnect/mega-menu` block, and a
 * "Contact Us" CTA. The menu's own styles, the hamburger's included
 * (`.oc-mega-menu-toggle`), ship with the block (PR 5.4); this file is the bar.
 */

/* --------------------------------------------------------------------------
 * Bar shell
 * ---------------------------------------------------------------------- */
.oc-header {
	position: sticky;
	top: 0;
	z-index: 100;
}

.oc-header__inner {
	padding-left: var(--wp--preset--spacing--30, 1.5rem);
	padding-right: var(--wp--preset--spacing--30, 1.5rem);
	gap: var(--wp--preset--spacing--30, 1.5rem);
}

.oc-header__logo {
	margin: 0;
	flex: 0 0 auto;
}

.oc-header__logo img {
	display: block;
	/* !important guards against inline width/height the block editor bakes onto
	   the <img> (and could persist to the front end if the part is ever saved). */
	height: 40px !important;
	width: auto !important;
}

.oc-header__actions {
	flex: 0 0 auto;
	gap: var(--wp--preset--spacing--20, 1rem);
}

/* --------------------------------------------------------------------------
 * The hamburger is styled and shown by `optconnect/mega-menu`'s own CSS. Hidden
 * here so a deploy that skipped `npm run build` (no block, no block CSS, no
 * script) doesn't show an empty, unstyled button that opens nothing.
 * ---------------------------------------------------------------------- */
.oc-mega-menu-toggle {
	display: none;
}

/* --------------------------------------------------------------------------
 * CTA button. `accent-2` under white text is 5.77:1 (AA); `accent-1` was 4.27:1.
 * The hover goes one step darker, #005a8c (7.39:1), which has no palette slot
 * (client decision, 2026-12-01).
 * ---------------------------------------------------------------------- */
.oc-header__actions .oc-cta .wp-block-button__link {
	background-color: var(--wp--preset--color--accent-2, #006ba4);
	color: #fff;
	border-radius: 999px;
	padding: 0.6rem 1.4rem;
	font-family: var(--wp--preset--font-family--nunito, sans-serif);
	font-size: 0.9rem;
	font-weight: 700;
	white-space: nowrap;
}

.oc-header__actions .oc-cta .wp-block-button__link:hover,
.oc-header__actions .oc-cta .wp-block-button__link:focus-visible {
	background-color: #005a8c;
}

/* --------------------------------------------------------------------------
 * Small phones: a smaller logo and tighter gaps keep logo, CTA and hamburger on
 * one row down to 320px.
 * ---------------------------------------------------------------------- */
@media (max-width: 480px) {
	.oc-header__inner {
		gap: 0.75rem;
	}

	.oc-header__logo img {
		height: clamp(26px, 8vw, 40px) !important;
	}

	.oc-header__actions {
		gap: 0.25rem;
	}

	.oc-header__actions .oc-cta .wp-block-button__link {
		padding: 0.55rem 1rem;
	}
}
