/* =============================================================
 * NNG Locations filter
 * Location search dropdowns + button toolbar on top of `forms-base.css`.
 * ============================================================= */

/* ----- Panel chrome overrides -----
 * Tighter corners and a single unified surface colour for the whole
 * filter (header + body) instead of the default white card with a
 * blue header bar. */
.nng-form.locations-filter {
	/* Site style guide: Lato. Bold is the default for all filter text;
	 * buttons and the controls are reset to normal weight below. */
	--nng-font: var(
		--wp--preset--font-family--lato,
		"Lato",
		"Helvetica Neue",
		arial,
		sans-serif
	);
	background: #f7f7f7;
	border: none;
	border-radius: 0;
	box-shadow: none;
	font-weight: 700;
}

.nng-form.locations-filter .form-header {
	background: transparent;
	color: var(--nng-color-text);
}

/* All non-control filter text is Lato Bold (header + field label). */
.nng-form.locations-filter .form-header,
.nng-form.locations-filter .form-row > label {
	font-weight: 700;
}

/* The control text (select + text input) stays Lato Normal. */
.nng-form.locations-filter select,
.nng-form.locations-filter input[type="text"] {
	font-weight: 400;
}

/* ----- Controls: stacked search dropdowns + button toolbar ----- */
.nng-form.locations-filter .locations-filter__controls {
	display: flex;
	flex-direction: column;
	gap: var(--nng-gap);
}

.nng-form.locations-filter .locations-filter__controls > .form-row {
	margin: 0;
}

.nng-form.locations-filter .locations-filter__toolbar {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 0.5rem;
}

/* Toolbar buttons size to their label rather than the wide default
 * `.nng-btn` column so CLEAR / RETRIEVE sit in a tidy row.
 * Pill-shaped (matching wp-block-button__link) and Lato Normal button
 * text per the style guide. */
.nng-form.locations-filter .nng-btn {
	font-weight: 400;
}

/* No underline on button hover/focus. */
.nng-form.locations-filter .nng-btn:hover,
.nng-form.locations-filter .nng-btn:focus-visible {
	text-decoration: none;
}

.nng-form.locations-filter .locations-filter__toolbar .nng-btn {
	min-width: 7rem;
	max-width: none;
}

/* RETRIEVE: primary action in Accent 1 navy (#2054AE). */
.nng-form.locations-filter .nng-btn[name="retrieve"] {
	background: var(--wp--preset--color--accent-1, #2054ae);
	border-color: var(--wp--preset--color--accent-1, #2054ae);
	color: #fff;
}

@media (max-width: 720px) {
	.nng-form.locations-filter .locations-filter__toolbar {
		justify-content: flex-start;
	}
}

/* Location Data table: mimic legacy SharePoint/Telerik grid wrapping.
 * Widths are compensated for this table's content-box cell model so the
 * visual result matches legacy col widths. */
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table__table {
	width: 1640px;
	min-width: 1640px;
	table-layout: fixed;
}

.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th,
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td {
	overflow: hidden;
	line-height: 1.5;
	text-overflow: clip;
	white-space: normal;
}

/* Compensated widths (1-20): 36,131,46,94,86,52,46,36,40,40,58,51,
 * 51,131,76,51,76,131,131,86. */
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(1),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(1) {
	width: 36px;
	max-width: 36px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(2),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(2) {
	width: 131px;
	max-width: 131px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(3),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(3) {
	width: 46px;
	max-width: 46px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(4),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(4) {
	width: 94px;
	max-width: 94px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(5),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(5) {
	width: 86px;
	max-width: 86px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(6),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(6) {
	width: 52px;
	max-width: 52px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(7),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(7) {
	width: 46px;
	max-width: 46px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(8),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(8) {
	width: 36px;
	max-width: 36px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(9),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(9) {
	width: 40px;
	max-width: 40px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(10),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(10) {
	width: 40px;
	max-width: 40px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(11),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(11) {
	width: 58px;
	max-width: 58px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(12),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(12) {
	width: 51px;
	max-width: 51px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(13),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(13) {
	width: 51px;
	max-width: 51px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(14),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(14) {
	width: 131px;
	max-width: 131px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(15),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(15) {
	width: 76px;
	max-width: 76px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(16),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(16) {
	width: 51px;
	max-width: 51px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(17),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(17) {
	width: 76px;
	max-width: 76px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(18),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(18) {
	width: 131px;
	max-width: 131px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(19),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(19) {
	width: 131px;
	max-width: 131px;
}
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(20),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(20) {
	width: 86px;
	max-width: 86px;
}

/* Match requested no-wrap behavior for Loc Loctr and Eff Date columns. */
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(4),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(4),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	thead
	th:nth-child(11),
.entry-content:has(> .nng-form.locations-filter)
	.wp-block-nng-data-table
	.wp-block-nng-data-table__table
	tbody
	td:nth-child(11) {
	white-space: nowrap;
}
