/* Mobile-first: a single-open accordion. */
.omg-menu-tabs__item {
	border-bottom: 1px solid var(--wp--preset--color--divider);
}

/* The flyout that wraps the tabs already draws a divider before the next
   top-level item, so the last tab's own border would double it up. */
.omg-menu-tabs__item:last-child {
	border-bottom: 0;
}

/* Breathing room below an expanded panel before the next tab row. */
.omg-menu-tabs__item.is-open {
	padding-bottom: 24px;
}

.omg-menu-tabs__trigger {
	appearance: none;
	margin: 0;
	border: 0;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.omg-menu-tabs__tile {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: var(--wp--preset--color--white);
	background: var(--wp--preset--color--primary);
}

/* Image tiles carry their own background and rounding; the primary fill behind
   a transparent PNG would otherwise show in the corners. */
img.omg-menu-tabs__tile {
	background: none;
	object-fit: cover;
}

.omg-menu-tabs__rail-text {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.omg-menu-tabs__rail-text strong {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--wp--preset--color--dark-blue);
}

.omg-menu-tabs__rail-text span {
	font-size: 12.5px;
	line-height: 1.3;
	color: var(--wp--preset--color--dark-blue-tint-2);
}

.omg-menu-tabs__chevron {
	flex-shrink: 0;
	color: var(--wp--preset--color--dark-blue-tint-2);
	transition: transform 0.3s cubic-bezier(0.7, 0.05, 0.2, 1);
}

.omg-menu-tabs__item.is-open .omg-menu-tabs__chevron {
	transform: rotate(180deg);
}

.omg-menu-tabs__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.3s ease;
}

.omg-menu-tabs__item.is-open .omg-menu-tabs__panel {
	grid-template-rows: 1fr;
}

/* No padding here: it would keep a collapsed accordion panel a few px tall and
   leak the panel content through the clip. */
.omg-menu-tabs__panel-inner {
	overflow: hidden;
	min-height: 0;
}

/* 24px rhythm above and between the panel sections (service bar, link columns,
   CTA card); the first child is included so the bar sits 24px below the trigger. */
.omg-menu-tabs__panel-inner > * {
	margin-top: 24px;
}

/* Desktop: two-pane tabs. Triggers form the left rail; one panel fills the
   right pane (absolutely placed, with height managed by view.js). */
@media (min-width: 1280px) {

	.omg-menu-tabs {
		position: relative;
		padding: 32px;
	}

	.omg-menu-tabs__item,
	.omg-menu-tabs__item.is-open {
		border-bottom: 0;
		padding-bottom: 0;
	}

	.omg-menu-tabs__trigger {
		width: 280px;
		gap: 14px;
		padding: 12px 14px;
		margin-bottom: 6px;
		border-radius: 12px;
		transition: background-color 0.2s ease;
	}

	.omg-menu-tabs__trigger:hover {
		background: var(--wp--preset--color--primary-tint-5);
	}

	.omg-menu-tabs__item.is-open .omg-menu-tabs__trigger {
		background: var(--wp--preset--color--primary-tint-5);
	}

	.omg-menu-tabs__chevron {
		display: none;
	}

	.omg-menu-tabs__panel {
		position: absolute;
		top: 32px;
		left: 352px;
		right: 32px;
		display: none;
		grid-template-rows: none;
	}

	.omg-menu-tabs__item.is-open .omg-menu-tabs__panel {
		display: block;
	}

	.omg-menu-tabs__panel-inner {
		overflow: visible;
	}

	/* Desktop keeps the bar flush at the pane top with 40px between sections. */
	.omg-menu-tabs__panel-inner > * {
		margin-top: 0;
	}

	.omg-menu-tabs__panel-inner > * + * {
		margin-top: 40px;
	}
}

