.os-hours__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin-bottom: 16px;
}

/* Without this a long name shoves the links over the next department. */
.os-hours__heading .os-hours__name {
	margin-bottom: 0;
	min-width: 0;
}

.fm-hours-actions {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.75rem;
}

/* Desktop: icons on the title line, chip trailing the location. */
@media (min-width: 992px) {
	/* Baseline: equal boxes leave the chip 9px above the location type. */
	.os-hours__dept {
		align-content: flex-start;
		align-items: baseline;
		column-gap: 0.75rem;
		display: flex;
		flex-wrap: wrap;
		row-gap: 4px;
	}

	/* No links means no heading wrapper: the bare name is the flex item. */
	.os-hours__heading,
	.os-hours__dept > .os-hours__name,
	.os-hours__days {
		flex: 0 0 100%;
	}

	.os-hours__heading {
		flex-wrap: nowrap;
	}

	.os-hours__location {
		flex: 0 1 auto;
		margin: 0;
	}

	.os-hours__location p {
		margin: 0;
	}

	/* Column gap, not margin: a margin survives the wrap and indents it. */
	.os-hours__open {
		flex: 0 0 auto;
		margin: 0;
	}

	.os-hours__days {
		margin-top: 10px;
	}
}

.fm-hours-action {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 44px;
	color: #007836;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-underline-offset: 0.16em;
}

.fm-hours-action:hover {
	color: #005f2b;
	text-decoration: underline;
}

.fm-hours-action:focus-visible,
.fm-hours-map-choices a:focus-visible {
	outline: 3px solid #007836;
	outline-offset: 3px;
}

.fm-hours-map-choices {
	position: relative;
}

.fm-hours-map-choices summary {
	cursor: pointer;
	list-style: none;
}

.fm-hours-map-choices summary::-webkit-details-marker {
	display: none;
}

.fm-hours-map-choices ul {
	position: absolute;
	z-index: 5;
	right: 0;
	min-width: 15rem;
	margin: 0.25rem 0 0;
	padding: 0.4rem;
	border: 1px solid #c8c8c8;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
	list-style: none;
}

.fm-hours-map-choices li {
	margin: 0;
}

.fm-hours-map-choices li + li {
	border-top: 1px solid #e2e2e2;
}

.fm-hours-map-choices li a {
	display: block;
	padding: 0.65rem;
	color: #007836;
	line-height: 1.3;
}

/* Icon-only: labels never fit beside a department name here. */
.fm-hours-action span {
	display: none;
}

.fm-hours-action {
	gap: 0;
	justify-content: center;
	min-width: 44px;
}

.fm-hours-action i {
	font-size: 1.35rem;
}

@media (max-width: 991px) {
	/* Name fills a narrow column alone; links and chip share the line below. */
	.os-hours__dept {
		align-content: flex-start;
		align-items: flex-start;
		column-gap: 0.75rem;
		display: flex;
		flex-wrap: wrap;
		row-gap: 4px;
	}

	.os-hours__heading {
		display: contents;
	}

	/* Source order splits links and chip, so order regroups them. */
	.os-hours__name {
		flex: 0 0 100%;
		margin-bottom: 0.5rem;
		order: 1;
	}

	.os-hours__actions {
		flex: 0 0 auto;
		order: 2;
	}

	.os-hours__open {
		align-self: center;
		flex: 0 0 auto;
		margin: 0;
		order: 3;
	}

	.os-hours__location {
		flex: 0 0 100%;
		margin-top: 0.75rem;
		order: 4;
	}

	.os-hours__days {
		flex: 0 0 100%;
		order: 5;
	}

	.fm-hours-actions {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.os-hours__dept--without-location .os-hours__heading {
		align-items: center;
		display: flex;
		flex: 0 0 100%;
		flex-wrap: nowrap;
		margin-bottom: 0.5rem;
		order: 1;
	}

	.os-hours__dept--without-location .os-hours__heading .os-hours__name {
		flex: 1 1 auto;
		margin-bottom: 0;
		order: initial;
	}

	.os-hours__dept--without-location .os-hours__actions {
		order: initial;
	}

	.os-hours__dept--without-location .os-hours__days {
		order: 2;
	}
}

@media (max-width: 560px) {
	.fm-hours-map-choices ul {
		right: auto;
		left: 0;
	}
}
