/* HAL Firearm Filter: plain and close to the XStore sidebar look. Colours inherit from the theme. */
.hal-ff { font-size: 14px; }
.hal-ff-form { margin: 0; }
.hal-ff-field { margin: 0 0 12px; }
.hal-ff-field label { display: block; margin: 0 0 4px; font-weight: 500; }
.hal-ff-field select { width: 100%; max-width: 100%; }
.hal-ff-field select:disabled { opacity: .6; cursor: not-allowed; }
.hal-ff-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.hal-ff .hal-ff-submit,
.hal-ff .hal-ff-submit:hover,
.hal-ff .hal-ff-submit:focus { color: #fff !important; border-radius: 6px !important; min-width: 140px; } /* !important: XStore's button styles win otherwise */
.hal-ff .hal-ff-submit:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.hal-ff-clear { text-decoration: underline; }
.hal-ff-active { margin: 0 0 12px; font-weight: 600; }
.hal-ff-notice { margin: 0 0 12px; padding: 8px 10px; border-left: 3px solid currentColor; background: rgba(0, 0, 0, .04); }
.hal-ff-help { margin: 4px 0 0; }
.hal-ff-help summary { cursor: pointer; text-decoration: underline; }
.hal-ff-help p { margin: 8px 0 0; }
.hal-ff-help-links { display: flex; gap: 12px; flex-wrap: wrap; }
.hal-ff-help-links a { text-decoration: underline; }

/* Visually hidden, still read by screen readers. */
.hal-ff-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Bar layout: [hal_firearm_filter layout="bar"] — one lean row ---------- */
.hal-ff--bar { margin: 0 0 16px; }
.hal-ff--bar .hal-ff-active { display: none; }                 /* the dropdowns already show the selection */
.hal-ff--bar .hal-ff-notice { margin: 0 0 6px; padding: 4px 8px; font-size: 13px; }
.hal-ff--bar .hal-ff-form { display: flex; align-items: center; gap: 8px; }
.hal-ff--bar .hal-ff-lead { flex: 0 0 auto; font-weight: 600; white-space: nowrap; margin-right: 4px; }
.hal-ff--bar .hal-ff-field { flex: 1 1 0; min-width: 0; margin: 0; }
.hal-ff--bar .hal-ff-field select { box-sizing: border-box; height: 40px; margin: 0; padding-top: 0; padding-bottom: 0; line-height: normal; } /* no vertical padding: the browser centres the text, nothing clips */
.hal-ff--bar .hal-ff-actions { flex: 0 0 auto; margin: 0; gap: 12px; flex-wrap: nowrap; white-space: nowrap; }
.hal-ff--bar .hal-ff .hal-ff-submit,
.hal-ff--bar .hal-ff-submit { min-width: 0; height: 40px; padding: 0 18px; margin: 0; display: inline-flex; align-items: center; justify-content: center; }
.hal-ff--bar .hal-ff-clear,
.hal-ff--bar .hal-ff-help summary { font-size: 13px; }

/* "Not listed?" opens as a floating panel, so the row never grows. */
.hal-ff--bar .hal-ff-help { position: relative; margin: 0; }
.hal-ff--bar .hal-ff-help summary { list-style: none; }
.hal-ff--bar .hal-ff-help summary::-webkit-details-marker { display: none; }
.hal-ff--bar .hal-ff-help-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 240px; padding: 10px 12px; white-space: normal; background: #fff; color: #222; border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.hal-ff--bar .hal-ff-help-panel p:first-child { margin-top: 0; }

/* Phones and small tablets: [Make][Model] / [Carry][Show holsters], then a thin line with Clear · Not listed? on the right. */
@media (max-width: 767px) {
	.hal-ff--bar .hal-ff-form { flex-wrap: wrap; gap: 8px; row-gap: 8px; }
	.hal-ff--bar .hal-ff-lead { flex: 1 1 100%; margin: 0 0 -2px; font-size: 13px; line-height: 1.2; } /* its own thin line above the dropdowns */
	.hal-ff--bar .hal-ff-field { flex: 1 1 calc(50% - 4px); }
	.hal-ff--bar .hal-ff-actions { display: contents; }          /* button and links join the form's own rows */
	.hal-ff--bar .hal-ff-submit { flex: 1 1 calc(50% - 4px); padding: 0 10px; }
	.hal-ff--bar .hal-ff-clear,
	.hal-ff--bar .hal-ff-help { flex: 0 0 auto; margin: -4px 0 0 auto; line-height: 1.2; }
	.hal-ff--bar .hal-ff-clear ~ .hal-ff-help { margin-left: 0; }
	.hal-ff--bar .hal-ff-help-panel { right: 0; }
}
