/**
 * Size chart — the product page, and the editor behind it.
 */

/* ============================================================
   The opener on the product page
   ============================================================ */
.sqp-sc { margin: 12px 0 0; }

.sqp-sc-open {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px;
	border: 1px solid rgba(0, 0, 0, .18);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}
.sqp-sc-open:hover { border-color: rgba(0, 0, 0, .4); background: #fafafa; }
.sqp-sc-open:focus-visible { outline: 2px solid #14539a; outline-offset: 2px; }
.sqp-sc-ico { flex: 0 0 auto; display: block; }

/* ============================================================
   The window
   ============================================================ */
.sqp-sc-modal[hidden] { display: none; }
.sqp-sc-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.sqp-sc-back { position: absolute; inset: 0; background: rgba(17, 24, 39, .5); }

.sqp-sc-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 620px;
	max-height: 86vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
	padding: 18px 20px 22px;
	border-radius: 16px;
	background: #fff;
	color: #222;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.sqp-sc-dialog:focus { outline: none; }

.sqp-sc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sqp-sc-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.sqp-sc-head .sqp-sc-title { flex: 1; }

.sqp-sc-close {
	flex: 0 0 auto;
	width: 34px; height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f2f4;
	color: #444;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}
.sqp-sc-close:hover { background: #e6e8ea; }

/* The page behind the window stays put. */
body.sqp-sc-lock { overflow: hidden; }

/* ============================================================
   The chart
   ============================================================ */
.sqp-sc--inline {
	padding: 16px 18px;
	border: 1px solid #e3e6ea;
	border-radius: 14px;
	background: #fff;
}
.sqp-sc--inline .sqp-sc-title { margin: 0 0 12px; }

/* A chart with six or seven sizes is wider than a phone; it scrolls inside
   this box so the page itself never scrolls sideways. */
.sqp-sc-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.sqp-sc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	text-align: center;
}
.sqp-sc-table th,
.sqp-sc-table td {
	padding: 10px 12px;
	border: 1px solid #e6e8ea;
	white-space: nowrap;
}
.sqp-sc-table thead th { background: #f6f7f8; font-weight: 700; }
.sqp-sc-table tbody th { background: #fafbfc; font-weight: 600; text-align: start; }

.sqp-sc-img { display: block; width: 100%; height: auto; border-radius: 10px; }

.sqp-sc-notes { margin: 14px 0 0; padding-inline-start: 18px; font-size: 13px; color: #666; }
.sqp-sc-notes li { margin: 0 0 4px; }

@media (max-width: 600px) {
	.sqp-sc-modal { padding: 0; align-items: flex-end; }
	.sqp-sc-dialog {
		max-width: none;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
		padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
	}
	.sqp-sc-open { width: 100%; justify-content: center; }
	.sqp-sc-table { font-size: 13.5px; }
	.sqp-sc-table th,
	.sqp-sc-table td { padding: 9px 10px; }
}

@media print {
	.sqp-sc-open,
	.sqp-sc-modal { display: none !important; }
}

/* ============================================================
   The editor (wp-admin)
   ============================================================ */
.sqp-sc-admin .sqp-sc-pane { margin: 18px 0; }
.sqp-sc-admin .sqp-sc-editwrap { overflow-x: auto; max-width: 100%; }

.sqp-sc-edit { width: auto; min-width: 100%; border-collapse: collapse; background: #fff; }
.sqp-sc-edit th,
.sqp-sc-edit td { padding: 6px; border: 1px solid #dcdcde; vertical-align: middle; }
.sqp-sc-edit thead th { background: #f6f7f7; }
.sqp-sc-edit .sqp-sc-corner { min-width: 90px; font-size: 12px; color: #646970; }
.sqp-sc-edit input[type="text"] { width: 100%; min-width: 84px; }
.sqp-sc-edit thead input[type="text"] { font-weight: 600; text-align: center; }

.sqp-sc-delcol,
.sqp-sc-delrow {
	margin-inline-start: 4px;
	border: 0;
	background: none;
	color: #b32d2e;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.sqp-sc-delcol:hover,
.sqp-sc-delrow:hover { color: #8a2424; }

.sqp-sc-admin .sqp-sc-preview img { max-width: 340px; height: auto; border: 1px solid #dcdcde; border-radius: 8px; }
