/**
 * Rocca Finds site header — reddish bar, logo/title + auth only (no menu links).
 */

header.wp-block-template-part {
	position: relative;
	z-index: 50;
}

header.wp-block-template-part > .wp-block-group.alignfull {
	padding-top: 0.35rem !important;
	padding-bottom: 0.35rem !important;
	background-color: #ee4d2d !important;
	border-bottom: 1px solid #c73e22;
	box-shadow: 0 1px 4px rgba(199, 62, 34, 0.15);
	color: #ffffff !important;
}

header.wp-block-template-part > .wp-block-group.alignfull .wp-block-group {
	padding-left: 0.75rem !important;
	padding-right: 0.75rem !important;
}

header.wp-block-template-part .rocca-brand-mark {
	padding: 0.3rem 0.45rem !important;
	font-size: 11px !important;
	line-height: 1 !important;
	border-radius: 6px !important;
}

header.wp-block-template-part .wp-block-site-tagline,
header.wp-block-template-part p.has-text-color[style*="ffe8df"] {
	display: none !important;
}

header.wp-block-template-part .wp-block-site-title,
header.wp-block-template-part .wp-block-site-title a {
	color: #ffffff !important;
	font-size: 0.95rem !important;
	font-weight: 800;
	line-height: 1.15;
	text-decoration: none;
}

/* Header navigation shows auth only (menu links stripped in PHP). */
header.wp-block-template-part .rocca-header-nav-auth-only {
	margin-left: auto;
	justify-content: flex-end;
}

header.wp-block-template-part .rocca-header-nav-auth-only .rocca-auth-nav {
	display: inline-flex !important;
	margin-left: 0;
	border-left: 0;
	padding-left: 0;
}

header.wp-block-template-part .wp-block-navigation .wp-block-navigation__container > .wp-block-navigation-item,
header.wp-block-template-part .wp-block-navigation .wp-block-navigation-link,
header.wp-block-template-part .wp-block-navigation .wp-block-page-list {
	display: none !important;
}

header.wp-block-template-part .wp-block-navigation .rocca-auth-nav,
header.wp-block-template-part .rocca-header-nav-auth-only .rocca-auth-nav {
	display: inline-flex !important;
}

header.wp-block-template-part .wp-block-site-logo img {
	max-height: 40px;
	width: auto;
}

header.wp-block-template-part .wc-block-mini-cart__button,
header.wp-block-template-part .wp-block-woocommerce-mini-cart {
	display: none !important;
}

/* Auth controls on reddish header */
header.wp-block-template-part .rocca-auth-nav {
	border-left-color: rgba(255, 255, 255, 0.35);
}

header.wp-block-template-part .rocca-auth-nav__user,
header.wp-block-template-part .rocca-auth-nav__link,
header.wp-block-template-part .rocca-auth-nav__login {
	color: #ffffff !important;
}

header.wp-block-template-part .rocca-auth-nav__link:hover,
header.wp-block-template-part .rocca-auth-nav__login:hover {
	color: #fff7f4 !important;
	opacity: 0.92;
}

header.wp-block-template-part .rocca-auth-nav__bell {
	color: #ffffff;
}

/* Remove search UI */
.wp-block-search,
.wp-block-navigation__search-button,
.wp-block-navigation .wp-block-search,
form.search-form,
.woocommerce-product-search,
.widget_product_search {
	display: none !important;
}

/* ── Mobile header layout ─────────────────────────────────────────── */

header.wp-block-template-part > .wp-block-group.alignfull > .wp-block-group {
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

header.wp-block-template-part > .wp-block-group.alignfull > .wp-block-group > .wp-block-group:first-child {
	flex: 1 1 auto;
	min-width: 0;
	flex-wrap: nowrap;
}

@media (max-width: 782px) {
	header.wp-block-template-part > .wp-block-group.alignfull {
		padding-top: max(0.35rem, env(safe-area-inset-top)) !important;
		padding-bottom: 0.35rem !important;
		padding-left: max(0.5rem, env(safe-area-inset-left)) !important;
		padding-right: max(0.5rem, env(safe-area-inset-right)) !important;
	}

	header.wp-block-template-part > .wp-block-group.alignfull .wp-block-group {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	header.wp-block-template-part .wp-block-site-logo img {
		max-height: 32px;
	}

	header.wp-block-template-part .wp-block-site-title,
	header.wp-block-template-part .wp-block-site-title a {
		font-size: 0.85rem !important;
	}

	header.wp-block-template-part .rocca-brand-mark {
		padding: 0.25rem 0.35rem !important;
		font-size: 10px !important;
	}

	header.wp-block-template-part .rocca-header-nav-auth-only {
		flex: 0 0 auto;
		margin-left: auto;
	}
}

@media (max-width: 480px) {
	header.wp-block-template-part .wp-block-site-logo img {
		max-height: 28px;
	}

	header.wp-block-template-part .wp-block-site-title,
	header.wp-block-template-part .wp-block-site-title a {
		font-size: 0.8rem !important;
	}
}

@media (max-width: 782px) {
	html {
		-webkit-text-size-adjust: 100%;
		text-size-adjust: 100%;
	}

	body {
		overflow-x: clip;
	}
}
