/* ---------------------------------------------------------------- Header
 * Green top bar (5px padding: member widget, Login / Account), then the header bar: logo and name, menu,
 * basket. Both are 1120px wide including 20px sides. Not sticky. The menu turns into a hamburger at 1023px
 * and opens as a 400px panel from the right.
 */

.site-header {
	position: relative;
}

/* ---- Top bar */

.ioa-topbar {
	background: var(--wp--preset--color--brand);
	padding-block: 5px;
}

.ioa-topbar__inner .wp-block-buttons {
	gap: 0;
}

.ioa-topbar__inner .brm-header,
.ioa-topbar__inner .brm-header * {
	color: #fff;
}

.ioa-topbar__inner > p:empty {
	display: none;
}

/* ---- Header bar */

.ioa-header {
	background: var(--wp--preset--color--page);
	border-bottom: 1px solid #fff6;
	padding-block: 10px;
}

.ioa-header > .ioa-header__inner {
	width: 100%;
}

@media (max-width: 767px) {
	.ioa-header > .ioa-header__inner {
		gap: 30px;
	}
}

/* Very small phones (under 360px): a smaller logo and menu-to-basket gap keep the wrapped name clear of the
   menu button down to 320px. */
@media (max-width: 359px) {
	.ioa-brand--header.ioa-brand--header .ioa-brand__logo img {
		width: 50px !important;
	}

	.ioa-header__actions.ioa-header__actions {
		gap: 12px;
	}
}

.ioa-header__actions {
	flex-shrink: 1;
}

/* ---- Logo and name (header and footer) */

.ioa-brand .ioa-brand__logo {
	flex-shrink: 0;
	margin: 0;
}

.ioa-brand .ioa-brand__logo a {
	display: block;
}

.ioa-brand .ioa-brand__logo img {
	display: block;
	width: 80px !important;
}

.ioa-brand__name {
	color: var(--wp--preset--color--body-text);
	font-size: 1.2em;
	font-weight: 700;
}

.ioa-brand__name a {
	color: inherit;
	text-decoration: none;
}

@media (max-width: 1119px) {
	.ioa-brand--header {
		width: 100%;
	}

	.ioa-brand--header .ioa-brand__name {
		font-size: 0.9em;
	}
}

@media (max-width: 767px) {
	.ioa-brand--header .ioa-brand__logo img {
		width: 60px !important;
	}

	/* On live the name ran under the menu button (Breakdance gave it min-width: 100% of the link). Fixed on
	   Matthew's request (18-11-2026): the name wraps in the space beside the logo. */
	.ioa-brand--header {
		min-width: 0;
	}

	.ioa-brand--header .ioa-brand__name {
		font-size: 0.7em;
		min-width: 0;
	}
}

/* ---- Menu: desktop (1024px and up) */

/* Breakdance's menu (and only the menu) is drawn with antialiased font smoothing. */
.ioa-nav {
	-webkit-font-smoothing: antialiased;
	color: var(--wp--preset--color--headings);
	font-size: 14px;
	font-weight: 500;
	line-height: 14px;
}

.ioa-nav .wp-block-navigation-item__content,
.ioa-nav .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--headings);
	text-decoration: none;
}

@media (min-width: 1024px) {
	/* 13px text and 14px side padding since 23-11-2026, so six items ("OMJ UK Judges" added) fit beside the logo
	   from 1024px up without touching the logo size. */
	.ioa-nav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content {
		font-size: 13px;
		padding: 16px 14px;
		white-space: nowrap;
	}

	/* The current page has a light grey box behind it (Breakdance "active background"). */
	.ioa-nav .wp-block-navigation__container > .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content {
		background-color: #eee;
	}
}

/* ---- Menu: hamburger and panel (1023px and down)
 * Core shows the hamburger only below 600px; Breakdance switched at 1023px. */

.ioa-nav .wp-block-navigation__responsive-container-open {
	height: 25px;
	padding: 0;
	position: relative;
	width: 25px;
}

.ioa-nav .wp-block-navigation__responsive-container-open svg {
	display: none;
}

/* Three 25 x 3px bars, 4px apart, rounded, centred in a 25px box. */
.ioa-nav .wp-block-navigation__responsive-container-open::before {
	background: var(--wp--preset--color--brand);
	border-radius: 6px;
	box-shadow: 0 7px 0 var(--wp--preset--color--brand), 0 14px 0 var(--wp--preset--color--brand);
	content: "";
	height: 3px;
	left: 0;
	position: absolute;
	top: 4px;
	width: 25px;
}

@media (max-width: 1023px) {
	.ioa-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.ioa-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

@media (min-width: 1024px) {
	.ioa-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: none;
	}

	.ioa-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		background: inherit;
		display: block;
		position: relative;
		width: 100%;
		z-index: auto;
	}
}

/* The open panel (Breakdance "off-canvas right"): white, 400px wide, full height, over a 25% black backdrop.
   A 50px top bar holds the close button; then one link per row, 20px padding, a #eee line between rows. */
/* Doubled class: core's open-menu rule (".wp-block-navigation:not(.has-background) ...", four classes) sets black text. */
.ioa-nav.ioa-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: #fff;
	box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.25);
	color: var(--wp--preset--color--headings);
	left: auto;
	max-width: 100%;
	padding: 0;
	right: 0;
	width: 400px;
	z-index: 1000;
}

.ioa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding: 50px 0 0;
}

.ioa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: stretch;
	border-bottom: 1px solid #eee;
	gap: 0;
	width: 100%;
}

.ioa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
}

.ioa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	border-top: 1px solid #eee;
	font-size: 14px;
	line-height: 1;
	padding: 20px;
	width: 100%;
}

@media (max-width: 767px) {
	.ioa-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
		font-size: calc(var(--ioa-base) * 1.5);
	}
}

/* Close button: a 20px cross of two 2px bars, 15px from the top and right. */
.ioa-nav .wp-block-navigation__responsive-container-close {
	height: 20px;
	right: 15px;
	top: 15px;
	transform: rotate(45deg);
	width: 20px;
}

.ioa-nav .wp-block-navigation__responsive-container-close svg {
	display: none;
}

.ioa-nav .wp-block-navigation__responsive-container-close::before,
.ioa-nav .wp-block-navigation__responsive-container-close::after {
	background: var(--wp--preset--color--headings);
	content: "";
	position: absolute;
}

.ioa-nav .wp-block-navigation__responsive-container-close::before {
	height: 2px;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 100%;
}

.ioa-nav .wp-block-navigation__responsive-container-close::after {
	height: 100%;
	left: 50%;
	top: 0;
	transform: translateX(-50%);
	width: 2px;
}

/* ---- Basket (Mini-Cart block): £0.00, the basket icon and a green count bubble. */

.ioa-cart .wc-block-mini-cart__button {
	color: #4b5563;
	gap: 0;
	line-height: 1.4;
	padding: 13px;
	position: relative;
}

.ioa-cart .wc-block-mini-cart__amount {
	color: var(--wp--preset--color--headings);
	display: inline;
	font-weight: 600;
	margin: 0 8px 0 0;
	order: -1;
}

.ioa-cart .wc-block-mini-cart__quantity-badge {
	position: static;
}

.ioa-cart .wc-block-mini-cart__icon {
	background-color: var(--wp--preset--color--body-text);
	height: 17px;
	-webkit-mask: url(../images/icons/basket.svg) 0 0 / contain no-repeat;
	mask: url(../images/icons/basket.svg) 0 0 / contain no-repeat;
	width: 17px;
}

.ioa-cart .wc-block-mini-cart__icon > * {
	display: none;
}

.ioa-cart .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--brand) !important;
	border: 0;
	border-radius: 100px;
	color: #fff !important;
	font-size: 10px;
	font-weight: 500;
	height: auto;
	left: auto;
	line-height: 10px;
	margin: 0;
	min-width: 0;
	padding: 4px 8px;
	position: absolute;
	right: -3px;
	top: 0;
	transform: none;
}
