/**
 * Bulk Publisher Availability Checker — page-scoped layout only.
 *
 * Buttons, tabs, inputs, radios/checkboxes, alerts, tags, icon boxes, pagination
 * and headings come from the Motta parent theme and gpl-child/style.css; this
 * file only arranges them and adds the pieces the theme has no component for
 * (step badges, panel frame, drop zone, results table sizing).
 */

/* Layout and component tokens */
.gpl-bac {
	--gpl-bac-border: #ecf0f4;
	--gpl-bac-error: #f21951;
	--gpl-bac-muted: #7c818b;
	--gpl-bac-radius: 3px;
	--gpl-bac-soft: #f5f7ff;
}

.gpl-bac-input-layout {
	display: grid;
	gap: 16px;
}

/* The theme's input[type=…] height (--mt-input__height: 60px) outranks .motta-input--medium,
   so size medium fields like medium buttons, as the child theme does for #per_page. */
.gpl-bac .motta-input--medium {
	--mt-input__height: var(--mt-size__medium);
}

/* Theme ghost medium buttons are 40px tall; match the other medium controls, as the
   child theme does for .status-filter. */
.gpl-bac .motta-button--ghost.motta-button--medium {
	height: var(--mt-size__medium);
}

.gpl-bac-muted {
	color: var(--gpl-bac-muted);
	font-weight: 400;
}

.gpl-bac .gpl-bac-icon {
	font-size: var(--gpl-bac-icon-size, 1em);
	line-height: 1;
}

/* Header and panels */
.gpl-bac-panel {
	margin-top: 16px;
	padding: 20px;
	border: 1px solid var(--gpl-bac-border);
	background-color: #fff;
}

.gpl-bac-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.gpl-bac-heading .gpl-bac-heading {
	margin-bottom: 0;
}

.gpl-bac-heading p {
	margin: 2px 0 0;
	font-size: 14px;
}

.gpl-bac-heading--split {
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
}

.gpl-bac-heading--toggle {
	align-items: center;
	cursor: pointer;
}

.gpl-bac-toggle {
	color: var(--gpl-bac-muted);
}

.gpl-bac-requirements-footer {
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--gpl-bac-border);
}

.gpl-bac-toggle .gpl-bac-icon {
	transition: transform 0.2s;
}

.gpl-bac-toggle[aria-expanded="true"] .gpl-bac-icon {
	transform: rotate(180deg);
}

.gpl-bac-step {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	display: inline-grid;
	place-items: center;
	border-radius: 50%;
	background-color: var(--mt-color__heading);
	color: #fff;
	font-weight: 600;
	line-height: 1;
}

/* Domain input and source tabs */
.gpl-bac-input-layout {
	grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.85fr);
}

.gpl-bac-entry {
	min-width: 0;
}

.gpl-bac-tabs {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: nowrap;
	align-items: flex-end;
	gap: 36px;
	min-width: 0;
	max-width: 100%;
	margin-bottom: 18px;
	padding: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
}

/* Motta's horizontal-tabs scrollbar behavior. */
.gpl-bac-tabs::-webkit-scrollbar {
	display: none;
}

/* Bridge the Motta Alternative Style from its link markup to semantic buttons. */
.gpl-bac-tabs .motta-tab__title {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0 0 6px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	line-height: 1.5;
	text-align: left;
	white-space: nowrap;
	cursor: pointer;
	min-width: auto;
}

.gpl-bac-tabs .motta-tab__title .motta-button__text > span[data-bac-filter-count] {
	padding: 0 0.5em;
	opacity: 0.7;
	font-weight: 400;
	font-size: 0.8em;
}

.gpl-bac-tabs .motta-tab__title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 2px;
	background-color: var(--mt-color__heading, #1d2128);
	transition: width .3s;
}

.gpl-bac-tabs .motta-tab__title:hover,
.gpl-bac-tabs .motta-tab__title:focus,
.gpl-bac-tabs .motta-tab__title.motta-tab--active {
	background: transparent;
	box-shadow: none;
	color: var(--orange);
}

.gpl-bac-tabs .motta-tab__title:hover::after,
.gpl-bac-tabs .motta-tab__title:focus-visible::after,
.gpl-bac-tabs .motta-tab__title.motta-tab--active::after {
	width: 100%;
	background-color: var(--orange);
}

.gpl-bac-tabs .motta-tab__title:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.gpl-bac-tabs .motta-button__icon {
	display: inline-flex;
	flex: 0 0 auto;
}

.gpl-bac-tab-panel textarea {
	min-height: 160px;
	line-height: 1.65;
	resize: vertical;
}

.gpl-bac-drop-zone {
	position: relative;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 6px;
	padding: 16px;
	border: 2px dashed var(--gpl-bac-border);
	border-radius: var(--gpl-bac-radius);
	color: var(--gpl-bac-muted);
	text-align: center;
	cursor: pointer;
	transition: border-color .3s;
}

/* Visually hidden, but unlike .screen-reader-text it stays hidden on focus. */
.gpl-bac-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	border: 0;
	opacity: 0;
}

.gpl-bac-drop-zone strong {
	color: var(--mt-color__heading);
}

.gpl-bac-drop-zone .gpl-bac-icon {
	color: var(--mt-color__primary);
}

.gpl-bac-drop-zone:hover,
.gpl-bac-drop-zone:focus-within,
.gpl-bac-drop-zone.is-dragover {
	border-color: var(--mt-color__heading);
}

.gpl-bac-inline-control,
.gpl-bac-table-actions {
	display: flex;
	gap: 8px;
}

.gpl-bac-inline-control {
	margin-top: 8px;
}

.gpl-bac-inline-control input {
	flex: 1;
	min-width: 0;
}

.gpl-bac-help {
	margin: 6px 0 0;
	font-size: 13px;
}

.gpl-bac-sheet-pickers {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	align-items: end;
	gap: 8px;
	margin-top: 12px;
}

.gpl-bac-sheet-pickers select {
	width: 100%;
}

.gpl-bac-detection {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 10px 0 12px;
	color: var(--gpl-bac-muted);
	font-size: 13px;
}

.gpl-bac-detection strong {
	color: var(--mt-color__heading);
	font-weight: 500;
}

.gpl-bac-entry-footer > .motta-alert {
	margin-bottom: 12px;
}

.gpl-bac-turnstile-wrap {
	position: relative;
	margin-bottom: 12px;
	min-height: 65px;
	width: 300px;
	max-width: 100%;
}

.gpl-bac-turnstile-skeleton {
	position: absolute;
	inset: 0;
	border-radius: 4px;
	background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: gpl-bac-shimmer 1.5s infinite linear;
	z-index: 1;
}

@keyframes gpl-bac-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.gpl-bac-turnstile {
	min-height: 65px;
}

.gpl-bac-button-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Lines the actions up with .motta-alert__description. */
.gpl-bac-over-limit .gpl-bac-button-row {
	padding: 12px 15px 0;
}

.gpl-bac-tips-wrapper {
	padding: 20px;
	border-radius: var(--gpl-bac-radius);
	background-color: var(--gpl-bac-soft);
}

.gpl-bac-tips-wrapper h3 {
	margin-bottom: 12px;
}

.gpl-bac-check-list {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
}

.gpl-bac-check-list li {
	display: flex;
	align-items: baseline;
	gap: 10px;
}

.gpl-bac-check-list .gpl-bac-icon {
	color: var(--notification-success);
}

/* Availability overview: stat cards ------------------------------------- */
.mt-stat-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 16px;
	margin: 0 0 18px;
}

/* Four cards here. */
.gpl-bac-stats.mt-stat-grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mt-stat-card {
	display: flex;
	align-items: center;
	font-size: 1rem;
	gap: 1em;
	padding: 1em;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 0.3em;
}

.mt-stat-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.625em;
	height: 2.625em;
	border-radius: 50%;
	font-size: 1.125em;
}

.mt-stat-card__icon svg {
	width: 1.375em;
	height: 1.375em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
}

.mt-stat-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	line-height: 1.3;
	font-family: var(--mt-font__main);
	width: 100%;
}

.mt-stat-card__value {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1a1a1a;
}

.mt-stat-card__label {
	font-size: 1rem;
	font-weight: 600;
	color: #1d2128;
}

.mt-stat-card__caption {
	font-size: 0.875rem;
	font-weight: 500;
	color: #666;
}

/* Copy button sits under the text, in the card's colour. */
.mt-stat-card .gpl-bac-stat__copy {
	align-self: flex-start;
	padding: 0;
	color: var(--gpl-bac-muted);
}

/* --- Stat card color variants --- */

.mt-stat-card.is-blue .mt-stat-card__icon {
	background: var(--blue-bg);
	color: var(--blue-text);
}
.mt-stat-card.is-blue .mt-stat-card__value {
	color: var(--blue-text);
}

.mt-stat-card.is-violet .mt-stat-card__icon,
.mt-stat-card.is-purple .mt-stat-card__icon {
	background: rgba(99, 91, 255, 0.08);
	color: #635bff;
}
.mt-stat-card.is-violet .mt-stat-card__value,
.mt-stat-card.is-purple .mt-stat-card__value {
	color: #635bff;
}

.mt-stat-card.is-amber .mt-stat-card__icon {
	background: #fdf0da;
	color: #d98a13;
}
.mt-stat-card.is-amber .mt-stat-card__value {
	color: #d98a13;
}

.mt-stat-card.is-green .mt-stat-card__icon {
	background: var(--notification-success-bg);
	color: var(--notification-success);
}
.mt-stat-card.is-green .mt-stat-card__value {
	color: var(--notification-success);
}

.mt-stat-card.is-orange .mt-stat-card__icon {
	background: rgba(255, 159, 0, 0.1);
	color: var(--matrix-orange);
}
.mt-stat-card.is-orange .mt-stat-card__value {
	color: var(--matrix-orange);
}

.mt-stat-card.is-red .mt-stat-card__icon {
	background: var(--notification-error-bg);
	color: var(--notification-error);
}
.mt-stat-card.is-red .mt-stat-card__value {
	color: var(--notification-error);
}

/* Requirement filters */
.gpl-bac-requirements {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
}

.gpl-bac-requirements fieldset {
	min-width: 0;
	margin: 0;
	padding: 0 20px;
	border: 0;
}

.gpl-bac-requirements fieldset:first-child {
	padding-left: 0;
}

.gpl-bac-requirements fieldset + fieldset {
	border-left: 1px solid var(--gpl-bac-border);
}

.gpl-bac-requirements legend {
	width: 100%;
	margin-bottom: 10px;
	padding: 0;
	font-weight: bold;
}

.gpl-bac-requirements .required {
	color: var(--gpl-bac-error);
}

.gpl-bac-requirements .motta-alert {
	margin-top: 12px;
}

.gpl-bac-options .gpl-bac-choice {
	display: flex;
	align-items: center;
	/* min-height: 38px;
	font-size: 14px; */
	justify-content: flex-start;
}

.gpl-bac-choice label {
	flex: 1;
	min-width: 0;
	cursor: pointer;
}

.gpl-bac-choice .gpl-tag {
	margin-left: 8px;
}

.gpl-bac-choice.is-disabled label {
	cursor: not-allowed;
	opacity: .6;
}

/* Results tabs, table, actions and states */
.gpl-bac-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.gpl-bac-toolbar .gpl-bac-tabs {
	margin-bottom: 0;
}

.gpl-bac-table-actions input[type="search"] {
	width: 220px;
}

.gpl-bac-request-bar {
	margin-bottom: 16px;
	padding: 14px 16px;
	border-radius: var(--gpl-bac-radius);
	background-color: var(--gpl-bac-soft);
}

.gpl-bac-request-bar > p:first-child {
	margin: 0;
}

.gpl-bac-request-bar .gpl-bac-request-message {
	text-align: left;
}

.gpl-bac-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--gpl-bac-border);
	border-radius: var(--gpl-bac-radius);
}

/* Text size is the theme's body size. */
/* DataTables header and striping for the checker only; the shared gpl-dataTables.css stays untouched. */
.gpl-bac table.dataTable > thead > tr > th,
.gpl-bac table.dataTable > thead > tr > td {
	padding: 10px;
	background-color: var(--blue-bg);
	border-bottom: 3px solid var(--blue-text);
}

.gpl-bac table.dataTable > thead > tr > th div.header-with-logo,
.gpl-bac table.dataTable > thead > tr > td div.header-with-logo {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
}

.gpl-bac table.dataTable > tbody > tr.gpl-bac-row:nth-child(even) > td {
	background-color: var(--blue-bg);
}

.gpl-bac-table {
	min-width: 1100px;
	margin: 0;
}

.gpl-bac-table th,
.gpl-bac-table td {
	padding: 12px 10px;
	vertical-align: middle;
}

.gpl-bac-table th {
	background-color: #f7f9fc;
	color: var(--mt-color__heading);
	font-weight: 500;
	white-space: nowrap;
}

.gpl-bac-table thead > tr > th.dt-orderable-asc:hover,
.gpl-bac-table thead > tr > th.dt-orderable-desc:hover,
.gpl-bac-table thead > tr > td.dt-orderable-asc:hover,
.gpl-bac-table thead > tr > td.dt-orderable-desc:hover {
	outline: 2px solid rgba(0, 0, 0, 0);
}

/* DataTables owns the sort-control markup; replace only its generated glyphs. */
.gpl-bac-table .dt-column-order::before,
.gpl-bac-table .dt-column-order::after {
	font-family: "Font Awesome 6 Free";
	font-size: .8em;
	font-weight: 900;
}

.gpl-bac-table .dt-orderable-asc .dt-column-order::before,
.gpl-bac-table .dt-ordering-asc .dt-column-order::before {
	content: "\f0de";
}

.gpl-bac-table .dt-orderable-desc .dt-column-order::after,
.gpl-bac-table .dt-ordering-desc .dt-column-order::after {
	content: "\f0dd";
}

.gpl-bac-table th small,
.gpl-bac-table td small {
	display: block;
	color: var(--gpl-bac-muted);
	font-weight: 400;
	font-size: 12px;
	font-size: 0.75rem;
}

.gpl-bac-table td small {
	margin-top: 4px;
}

.gpl-bac-table th:nth-child(-n+2),
.gpl-bac-table td:nth-child(-n+2) {
	text-align: left;
}

/* Column 1 only carries the fixed "requested first" sort; it is not user-sortable, so no arrow. */
.gpl-bac-table thead th:first-child .dt-column-order {
	display: none;
}

.gpl-bac-table input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
}

.gpl-bac-domain {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #000;
	font-weight: 500;
	white-space: nowrap;
}

.gpl-bac-domain > .gpl-bac-icon {
	color: var(--gpl-bac-muted);
}

/* "+N" categories badge: the theme's .policy-info-tooltip, widened to a pill for 2+ digits. */
.gpl-bac-niche-more {
	width: auto;
	min-width: 18px;
	height: 18px;
	padding: 0 6px;
	border-radius: 9px;
	font-size: 12px;
	cursor: help;
}

/* Its CSS-only tooltip would be clipped by the table's scroll box: .gpl-bac-tooltip replaces it. */
.gpl-bac-niche-more::before,
.gpl-bac-niche-more::after {
	content: none;
}

/* Category list, placed by bulk-availability-checker.js; colours, radius and shadow of .policy-info-tooltip. */
.gpl-bac-tooltip {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	max-width: min(320px, calc(100vw - 16px));
	padding: 8px 12px;
	border-radius: 8px;
	background-color: rgba(33, 37, 41, .98);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	pointer-events: none;
}

.gpl-bac-tooltip.is-offscreen {
	visibility: hidden;
}

.gpl-bac-tooltip::after {
	content: "";
	position: absolute;
	width: 10px;
	height: 10px;
	background-color: inherit;
	transform: rotate(45deg);
}

.gpl-bac-tooltip[data-placement="top"]::after,
.gpl-bac-tooltip[data-placement="bottom"]::after {
	left: calc(var(--gpl-bac-tip-arrow, 50%) - 5px);
}

.gpl-bac-tooltip[data-placement="left"]::after,
.gpl-bac-tooltip[data-placement="right"]::after {
	top: calc(var(--gpl-bac-tip-arrow, 50%) - 5px);
}

.gpl-bac-tooltip[data-placement="top"]::after {
	bottom: -5px;
}

.gpl-bac-tooltip[data-placement="bottom"]::after {
	top: -5px;
}

.gpl-bac-tooltip[data-placement="left"]::after {
	right: -5px;
}

.gpl-bac-tooltip[data-placement="right"]::after {
	left: -5px;
}

.gpl-bac-table .gpl-bac-metric-column {
	width: 1%;
	white-space: nowrap;
}

.gpl-bac-metric-value {
	color: #282d33;
	font-weight: 600;
}

.gpl-bac-table .gpl-tag {
	white-space: nowrap;
}

/* Inline "Change ▾" button shown beside "Not supported" (and after manual-change annotation). */
.gpl-bac-table .gpl-bac-change-btn {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 2px;
	width: max-content;
	min-width: 0;
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	color: var(--mt-color__primary);
	cursor: pointer;
	font-size: inherit;
	line-height: inherit;
	vertical-align: baseline;
	white-space: nowrap;
}

/* Higher specificity to override Motta's global button:hover background-color rule. */
.gpl-bac-table .gpl-bac-change-btn:hover,
.gpl-bac-table .gpl-bac-change-btn:active,
.gpl-bac-table .gpl-bac-change-btn:focus,
.gpl-bac-table .gpl-bac-change-btn:focus-visible {
	background: none;
	text-decoration: underline;
	outline: none;
}

.gpl-bac-change-btn .gpl-bac-icon {
	transition: transform .15s;
}

.gpl-bac-change-btn[aria-expanded="true"] .gpl-bac-icon {
	transform: rotate(180deg);
}

/* Floating add-on option popover, appended to <body> to escape table-container clipping. */
.gpl-bac-addon-menu {
	position: fixed;
	z-index: 99999;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .1);
	border-radius: 6px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .1), 0 1px 4px rgba(0, 0, 0, .06);
	min-width: 200px;
	max-width: 300px;
	padding: 4px 0 6px;
}

/* Upward pointer; JS sets --bac-arrow-x to the trigger's centre so it always aligns. */
.gpl-bac-addon-menu::before {
	content: '';
	position: absolute;
	top: -6px;
	left: var(--bac-arrow-x, 16px);
	width: 10px;
	height: 10px;
	background: #fff;
	border-left: 1px solid rgba(0, 0, 0, .1);
	border-top: 1px solid rgba(0, 0, 0, .1);
	transform: rotate(45deg);
}

.gpl-bac-addon-menu__heading {
	margin: 0;
	padding: 10px 14px 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--mt-color__heading);
}

.gpl-bac-addon-menu__opt {
	display: block;
	width: 100%;
	padding: 9px 14px;
	background: none;
	border: none;
	border-radius: 0;
	text-align: left;
	font-size: 14px;
	color: var(--mt-color__heading);
	line-height: 1.35;
	cursor: pointer;
}

.gpl-bac-addon-menu__opt:hover,
.gpl-bac-addon-menu__opt:focus {
	background: var(--blue-bg);
	outline: none;
}

.gpl-bac-addon-menu__opt.is-selected {
	font-weight: 600;
	color: var(--mt-color__primary);
}

.gpl-bac-row--mismatch td,
.gpl-bac-row--not-found td {
	color: var(--gpl-bac-muted);
}

/* In-cart row: reduced opacity + left-edge accent; distinct from selection and match states. */
.gpl-bac-row--in-cart td {
	opacity: .55;
}

.gpl-bac-row--in-cart td:first-child {
	box-shadow: inset 3px 0 0 var(--notification-success);
}

/* Pending-cart row: light fade while the AJAX request is in flight. */
.gpl-bac-row--pending-cart td {
	opacity: .7;
}

/* "In Cart ✓" badge in the Actions column. */
/* Look comes from the Motta text button classes; this only stacks it under the In Cart badge. */
.gpl-bac-remove-row {
	display: flex;
	margin: 8px auto 0;
}

.gpl-bac-in-cart {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--notification-success);
	font-weight: 600;
	white-space: nowrap;
}

/* "Adding…" placeholder while the AJAX request is in flight. */
.gpl-bac-pending-cart {
	font-style: italic;
}

.gpl-bac-table td.dt-empty {
	padding: 48px 16px;
	text-align: center;
}

.gpl-bac-empty strong,
.gpl-bac-empty span {
	display: block;
}

.gpl-bac-empty strong {
	color: var(--mt-color__heading);
}

.gpl-bac-table-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 16px;
	color: var(--gpl-bac-muted);
	font-size: 14px;
}

.gpl-bac-table-footer select {
	--mt-input__height: var(--mt-size__medium);
	width: auto;
	margin: 0 6px;
}

/* Theme .pagination is full width and centred; keep it on the footer's right. */
.gpl-bac-table-footer .pagination {
	width: auto;
	margin: 0 0 0 auto;
}

.gpl-bac-table-footer .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* The theme's .site { overflow: hidden } blocks position: sticky, so checker pages clip
   horizontally without making .site a scroll container. */
.gpl-bac-page .site {
	overflow: visible;
	overflow-x: clip;
}

/* Cart bar: sticks to the bottom of the viewport while the results section is on screen, and
   rests under the table once the section ends. */
.gpl-bac-cart-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin-top: 16px;
	padding: 14px 16px;
	border: 1px solid var(--gpl-bac-border);
	background: linear-gradient(var(--blue-bg), var(--blue-bg)), #fff;
}

/* Added by the script once the table header and two rows are on screen. */
.gpl-bac-cart-bar.is-sticky {
	position: sticky;
	bottom: var(--gpl-bac-sticky-bottom, 0);
	z-index: 5;
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.gpl-bac-cart-bar__summary {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.gpl-bac-cart-bar__icon {
	color: var(--notification-success);
}

/* Sits on the bottom line of the summary, level with the Total text. */
.gpl-bac-clear-cart {
	align-self: flex-end;
	height: 25px;
	margin-left: 8px;
	color: var(--gpl-bac-muted);
}

.gpl-bac-cart-bar__count,
.gpl-bac-cart-bar__total {
	margin: 0;
}

.gpl-bac-cart-bar__count {
	color: var(--mt-color__heading);
	font-weight: 600;
}

.gpl-bac-cart-bar__total {
	margin-top: 2px;
	color: var(--gpl-bac-muted);
	font-size: 14px;
}

.gpl-bac-cart-bar__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-left: auto;
}

.gpl-bac-cart-bar .motta-alert {
	flex: 1 1 100%;
	margin: 0;
}

.gpl-bac-cart-bar .gpl-bac-cart-message {
	flex: 1 1 100%;
	text-align: left;
}

.gpl-bac-cart-bar .gpl-bac-cart-message:empty {
	display: none;
	min-height: 0;
	margin: 0;
}

/* The theme's back-to-top button rides above the sticky bar instead of under it. */
body.gpl-bac-bar-sticky #gotop {
	bottom: var(--gpl-bac-gotop-bottom, 120px);
}

/* Phones: a two-row bar (summary, then the buttons) instead of three stacked rows. */
@media (max-width: 767px) {
	.gpl-bac-cart-bar {
		gap: 8px;
		padding: 10px 12px;
	}

	.gpl-bac-cart-bar__summary {
		flex: 1 1 100%;
	}

	.gpl-bac-cart-bar__icon {
		display: none;
	}

	.gpl-bac-cart-bar__summary > div {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0 8px;
	}

	.gpl-bac-cart-bar__count {
		font-size: 14px;
	}

	.gpl-bac-cart-bar__total {
		margin-top: 0;
		font-size: 13px;
	}

	.gpl-bac-cart-bar__actions {
		flex: 1 1 100%;
		flex-wrap: nowrap;
		gap: 8px;
		margin-left: 0;
	}

	.gpl-bac-cart-bar__actions .gpl-bac-add-to-cart {
		flex: 1 1 auto;
		min-width: 0;
		padding-right: 12px;
		padding-left: 12px;
		font-size: 13px;
	}

	.gpl-bac-cart-bar__actions [data-bac-view-cart] {
		flex: 0 0 auto;
		min-width: 0;
		padding-right: 14px;
		padding-left: 14px;
	}

	/* View cart keeps its arrow; the words stay for screen readers. */
	.gpl-bac-cart-bar__actions [data-bac-view-cart] .motta-button__text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.gpl-bac-cart-bar__actions [data-bac-view-cart] .motta-button__icon {
		margin: 0;
	}
}

.gpl-bac-cart-message,
.gpl-bac-request-message {
	min-height: 20px;
	margin: 8px 0 0;
	color: var(--notification-success);
	font-size: 13px;
	text-align: center;
}

.gpl-bac-cart-message.is-error,
.gpl-bac-request-message.is-error {
	color: var(--gpl-bac-error);
}

/* Responsive */
@media (max-width: 1024px) {
	.gpl-bac-toolbar {
		flex-direction: column;
	}

	.gpl-bac-table-actions {
		width: 100%;
	}

	.gpl-bac-table-actions input[type="search"] {
		flex: 1;
		width: auto;
	}

	.gpl-bac-requirements {
		grid-template-columns: minmax(0, 1fr);
		grid-auto-flow: row;
	}

	.gpl-bac-requirements fieldset,
	.gpl-bac-requirements fieldset:first-child {
		padding: 14px 0;
	}

	.gpl-bac-requirements fieldset + fieldset {
		border-left: 0;
		border-top: 1px solid var(--gpl-bac-border);
	}

	.gpl-bac-stats.mt-stat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.gpl-bac-panel {
		padding: 14px;
	}

	.gpl-bac-input-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.gpl-bac-button-row .motta-button {
		flex: 1 1 auto;
	}

	.gpl-bac-table-actions,
	.gpl-bac-inline-control {
		flex-direction: column;
	}

	/* Stacked: grow across, not down. */
	.gpl-bac-table-actions input[type="search"],
	.gpl-bac-inline-control input {
		flex: none;
	}

	.gpl-bac-sheet-pickers {
		grid-template-columns: minmax(0, 1fr);
	}

	.gpl-bac-stats.mt-stat-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.gpl-bac-cart-bar__actions {
		width: 100%;
		margin-left: 0;
	}
}

/* Components above set their own display; keep the hidden attribute authoritative. */
.gpl-bac [hidden] {
	display: none;
}
