/* EFS Sites — the manufacturer product table. */

.efs-ptable-wrap { margin-top: 14px; }

.efs-ptable-tools {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 10px;
}
.efs-pt-search {
	flex: 1 1 220px;
	max-width: 320px;
	padding: 8px 11px;
	border: 1px solid #d0d5dd;
	border-radius: 7px;
	font-size: 14px;
}
.efs-pt-search:focus { outline: none; border-color: var(--green,#1F6FD6); }
.efs-pt-count { font-size: 13px; color: var(--muted, #667085); white-space: nowrap; }

.efs-ptable {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid var(--line, #e4e7ec);
	border-radius: 10px;
	overflow: hidden;
	font-size: 14px;
}
.efs-ptable thead th {
	text-align: left;
	padding: 9px 12px;
	background: #f7f8fa;
	border-bottom: 1px solid var(--line, #e4e7ec);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted, #667085);
	white-space: nowrap;
}
.efs-pt-sortable { cursor: pointer; user-select: none; }
.efs-pt-sortable:hover { color: var(--ink, #1e2432); }
.efs-ptable th[data-dir="asc"]::after { content: " \25B2"; font-size: 9px; }
.efs-ptable th[data-dir="desc"]::after { content: " \25BC"; font-size: 9px; }

.efs-ptable td {
	padding: 9px 12px;
	border-bottom: 1px solid #f0f2f5;
	vertical-align: middle;
}
.efs-ptable tbody tr:last-child td { border-bottom: none; }
.efs-ptable tbody tr:hover { background: #fbfcfd; }

.efs-pt-pic { width: 60px; padding-right: 0 !important; }
.efs-pt-pic img { display: block; width: 56px; height: 42px; object-fit: cover; border-radius: 4px; }
.efs-pt-name a { color: var(--ink, #1e2432); text-decoration: none; font-weight: 600; }
.efs-pt-name a:hover { color: var(--green-dk,#1A5DB5); text-decoration: underline; }
.efs-pt-pack, .efs-pt-item { white-space: nowrap; color: var(--muted, #667085); }
.efs-pt-item { font-family: Consolas, Monaco, monospace; }

.efs-pt-sites summary {
	cursor: pointer;
	color: var(--green-dk,#1A5DB5);
	font-weight: 600;
	font-size: 13px;
	list-style: none;
}
.efs-pt-sites summary::-webkit-details-marker { display: none; }
.efs-pt-sites summary::after { content: " \25BE"; color: #98a2b3; font-weight: 400; }
.efs-pt-sites details[open] summary::after { content: " \25B4"; }
.efs-pt-sitelist {
	margin-top: 5px;
	max-width: 340px;
	font-size: 12.5px;
	line-height: 1.55;
	color: var(--muted, #667085);
}
.efs-pt-ask { font-size: 13px; color: #98a2b3; }
.efs-pt-none { color: var(--muted, #667085); }

@media (max-width: 720px) {
	.efs-ptable thead { display: none; }
	.efs-ptable, .efs-ptable tbody, .efs-ptable tr, .efs-ptable td { display: block; width: 100%; }
	.efs-ptable tr { padding: 10px 12px; border-bottom: 1px solid var(--line, #e4e7ec); }
	.efs-ptable td { padding: 2px 0; border: none; }
	.efs-pt-pic img { width: 100%; height: 150px; margin-bottom: 6px; }
}

.efs-pt-site {
	padding: 8px 10px;
	border: 1px solid #d0d5dd;
	border-radius: 7px;
	font-size: 14px;
	background: #fff;
	max-width: 220px;
}
.efs-pt-site:focus { outline: none; border-color: var(--green,#1F6FD6); }

.efs-pt-note {
	margin: 0 0 10px;
	padding: 8px 12px;
	background: #fff8e6;
	border-radius: 6px;
	font-size: 13px;
	color: #6b4e08;
}
.efs-pt-note[hidden] { display: none; }

/* ---- Choosing several sites ---- */

.efs-sitepick {
	max-height: 260px;
	overflow-y: auto;
	padding: 10px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 8px;
	background: #fff;
}
.efs-sitepick-group {
	border: none;
	margin: 0 0 12px;
	padding: 0;
}
.efs-sitepick-group:last-child { margin-bottom: 0; }
.efs-sitepick-group legend {
	padding: 0;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted, #667085);
}
.efs-sitepick-group label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 3px 12px 3px 0;
	font-size: 13.5px;
	font-weight: 400;
	/* A site name is one thing. Without this "West Texas" breaks across two lines and reads
	   as two sites. Labels still wrap between each other, just never inside a name. */
	white-space: nowrap;
}
/* On the front end this picker lands inside other people's forms, one of which had a blanket
   `input { width: 100% }` — a checkbox that stretches sits under its own label and the list
   becomes unreadable. An explicit size rather than `auto`: wp-admin draws checkboxes with
   appearance:none and relies on width and height being set, so `auto` collapses them to a dot.
   That is what happened on 20 Sept. One size works in both places. */
.efs-sitepick-group label input[type="checkbox"] {
	flex: none;
	display: inline-block;
	width: 16px;
	min-width: 16px;
	height: 16px;
	margin: 0;
	padding: 0;
}

/* The wrapper is a <label> inside forms that make labels block-level and bold. Inside the
   picker they are ordinary text beside a box. */
.efs-sitepick label {
	display: inline-flex;
	width: auto;
	margin-bottom: 0;
	font-weight: 400;
}

/* An upload that was partly refused is neither success nor failure. */
.efs-mp-warn {
	padding: 10px 13px;
	margin-bottom: 14px;
	border-radius: 7px;
	background: #fff8e6;
	border: 1px solid #f0dca8;
	color: #6b4e08;
	font-size: 14px;
	line-height: 1.55;
}

/* In wp-admin the picker sits inside the profile form, whose own stylesheet targets elements
   through ID selectors (#your-profile ...). No number of classes beats an ID, so these
   declarations are marked important. That is the legitimate use of it: a component keeping its
   own appearance inside a host stylesheet it does not control and cannot predict. */
.wp-admin .efs-sitepick {
	max-width: 760px;
}

.wp-admin .efs-sitepick-group {
	margin-bottom: 14px !important;
}

.wp-admin .efs-sitepick-group legend {
	display: block !important;
	float: none !important;
	width: auto !important;
	font-size: 11px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	color: #787c82 !important;
	padding: 0 !important;
	margin: 0 0 5px !important;
}

.wp-admin .efs-sitepick-group label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	margin: 0 20px 7px 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	line-height: 1.4 !important;
	font-weight: 400 !important;
	/* A site name is one thing — "West Texas" split across two lines reads as two sites. */
	white-space: nowrap !important;
	vertical-align: middle !important;
}

.wp-admin .efs-sitepick-group label input[type="checkbox"] {
	width: 1rem !important;
	min-width: 1rem !important;
	height: 1rem !important;
	margin: 0 !important;
	flex: none !important;
	vertical-align: middle !important;
}

/* Show N per page, and the pager beneath the table (Steve, 26 Sept). */
.efs-pt-perwrap { font-size: 13px; color: var(--muted, #667085); display: inline-flex; align-items: center; gap: 6px; }
.efs-pt-perwrap select {
	font: inherit; padding: 4px 8px; border: 1px solid #d0d5dd; border-radius: 8px; background: #fff; color: var(--ink, #101828);
}
.efs-pt-pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.efs-pt-page {
	font: inherit; font-size: 13px; padding: 6px 11px; border: 1px solid #d0d5dd; border-radius: 8px;
	background: #fff; color: var(--ink, #101828); cursor: pointer;
}
.efs-pt-page:hover { border-color: var(--green,#1F6FD6); }
.efs-pt-page.is-current { background: var(--green,#1F6FD6); border-color: var(--green,#1F6FD6); color: #fff; font-weight: 600; }
.efs-pt-gap { font-size: 13px; color: var(--muted, #667085); padding: 0 2px; }
@media print { .efs-pt-pager, .efs-pt-perwrap { display: none; } }
