/* Product field of the request forms (Saphonyx Product Finder 0.2.13). The box copies the forms' fields: white, 1px #ccc
   border, 3px corners, Arial 13.3px #4e4e4e, 8px padding. Chips copy Christophe's mockup (grey pill, « × » after a
   divider). */

.spx-pf-source { display: none !important; }   /* the original field, still sent with the form */

.spx-pf {
	position: relative; box-sizing: border-box; width: 100%; min-height: 78px; margin: 0; padding: 6px;
	background: #fff; border: 1px solid #ccc; border-radius: 3px; cursor: text;
	font: 13.3333px/1.3 Arial, Helvetica, sans-serif; color: #4e4e4e;
}
.spx-pf:focus-within { border-color: #2ea3f2; }
.spx-pf-source.wpcf7-not-valid ~ .spx-pf { border-color: #dc3232; }

/* Divi styles every « .entry-content ul » (padding 0 0 23px 1em, bullets): the selectors below are stronger on purpose */
.spx-pf ul.spx-pf-list, .spx-pf ul.spx-pf-lb { margin: 0 !important; padding: 0 !important; list-style: none !important; line-height: 1.3; }
.spx-pf ul.spx-pf-list > li, .spx-pf ul.spx-pf-lb > li { list-style: none !important; }
.spx-pf ul.spx-pf-list[hidden] { display: none !important; }
.spx-pf-chips ul.spx-pf-list { display: inline !important; }
.spx-pf-chips .spx-pf-item { display: inline-flex; margin: 2px 6px 4px 0; padding: 0; vertical-align: middle; }

.spx-chip {
	display: inline-flex; align-items: stretch; max-width: 100%; box-sizing: border-box;
	background: #e6e6e6; border: 1px solid #d2d2d2; border-radius: 7px; color: #333; cursor: default;
	font: 14px/1.2 Arial, Helvetica, sans-serif;
}
.spx-chip-name { padding: 7px 8px 7px 10px; overflow-wrap: anywhere; }
.spx-chip-x {
	display: flex; align-items: center; justify-content: center; flex: none; margin: 0; padding: 0 8px;
	background: none; border: 0; border-left: 1px solid #c4c4c4; border-radius: 0 7px 7px 0; color: #555; cursor: pointer;
	min-height: 0; font: inherit; text-transform: none;
}
.spx-chip-x:hover { background: #d8d8d8; color: #b3261e; }
.spx-chip-x:focus-visible { outline: 2px solid #1f6fae; outline-offset: -2px; }
.spx-chip-unknown { background: #fff; border: 1px dashed #8a8a8a; }
.spx-chip-armed { background: #cfe3f5; border-color: #2ea3f2; }
.spx-chip-flash { animation: spx-chip-flash .6s ease 2; }
@keyframes spx-chip-flash { 50% { background: #cfe3f5; border-color: #2ea3f2; } }

/* price and order forms: one line per product; the lines share one grid so the boxes line up (subgrid) */
.spx-pf-rows ul.spx-pf-list {
	display: grid !important; grid-template-columns: max-content minmax(120px, 1fr) minmax(90px, 160px); gap: 6px; margin: 0 0 4px !important;
}
.spx-pf-rows .spx-pf-row {
	display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; margin: 0; padding: 0;
}
.spx-pf-rows .spx-pf-row .spx-chip { justify-self: start; }
@supports not (grid-template-columns: subgrid) {
	.spx-pf-rows .spx-pf-row { grid-template-columns: minmax(0, 220px) minmax(120px, 1fr) minmax(90px, 160px); gap: 6px; }
}
.spx-pf-pack, .spx-pf-qty {
	box-sizing: border-box; width: 100%; margin: 0; padding: 7px 8px; background: #fff; border: 1px solid #ccc; border-radius: 3px;
	font: 13.3333px/1.3 Arial, Helvetica, sans-serif; color: #4e4e4e;
}
.spx-pf-pack:focus, .spx-pf-qty:focus { border-color: #2ea3f2; outline: none; }

.spx-pf-entry { position: relative; display: inline-block; min-width: 200px; width: auto; vertical-align: middle; }
.spx-pf-rows .spx-pf-entry { display: block; width: 100%; }
.spx-pf-input {
	box-sizing: border-box; width: 100%; min-width: 200px; margin: 2px 0; padding: 7px 4px !important; background: transparent !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none; font: 13.3333px/1.3 Arial, Helvetica, sans-serif; color: #4e4e4e;
	-webkit-appearance: none; appearance: none;   /* 0.2.14: a search field, drawn like plain text */
}
.spx-pf-input::-webkit-search-cancel-button, .spx-pf-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.spx-pf-lb {
	position: absolute; left: 0; top: 100%; z-index: 50; box-sizing: border-box; min-width: 280px; max-width: min(520px, calc(100vw - 40px));
	max-height: 290px; overflow-y: auto; margin: 2px 0 0; padding: 4px 0; list-style: none;
	background: #fff; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.spx-pf-lb[hidden] { display: none; }
.spx-pf-opt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0; padding: 8px 12px; list-style: none; cursor: pointer; font-size: 14px; color: #2b2b2b; }
.spx-pf-opt[aria-selected="true"], .spx-pf-opt:hover { background: #e8f4fd; }
.spx-pf-opt-name { font-weight: 700; }
.spx-pf-opt-alias { color: #666; font-size: 12.5px; }

.spx-pf-help { margin: 4px 0 0; padding: 0; color: #777; font-size: 12.5px; line-height: 1.4; }
.spx-pf-sr, .spx-pf-live {
	position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 600px) {
	.spx-pf-rows ul.spx-pf-list { grid-template-columns: 1fr 1fr; row-gap: 6px; }
	.spx-pf-rows .spx-pf-row { margin-bottom: 4px; }
	.spx-pf-rows .spx-pf-row .spx-chip { grid-column: 1 / -1; justify-self: start; }
	.spx-pf-entry, .spx-pf-input { min-width: 0; width: 100%; }
	.spx-pf-lb { min-width: 0; width: 100%; }
}
