/* LinkedIn photo background changer: the photo with its new background on the left, the backgrounds, the
   previews and the file on the right (one column when narrow). The shared parts are in assets/css/tools.css. */

.pst-bgc [hidden] {
	display: none !important;
}

.pst-bgc__stage {
	position: relative;
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 240px;
	overflow: hidden;
	border-radius: 18px;
	background: var(--pst-tint);
}

.pst-bgc__stage canvas {
	display: block;
	max-width: 100%;
	max-height: 640px;
	width: auto;
	height: auto;
}

.pst-bgc__busy {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 20px;
	background: rgba(250, 247, 242, 0.9);
	text-align: center;
}

.pst-bgc__busy small {
	max-width: 32ch;
	color: var(--pst-muted);
	font-size: 14px;
}

.pst-bgc__kinds .pst-seg__btn {
	min-height: 42px;
	padding: 6px 8px;
	font-size: 15px;
}

.pst-bgc__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	gap: 8px;
}

.pst-bgc__thumb {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	margin: 0;
	padding: 4px 4px 6px;
	border: 1.5px solid var(--pst-line);
	border-radius: 10px;
	background: var(--pst-white);
	color: var(--pst-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	overflow-wrap: anywhere;
}

.pst-bgc__thumb span {
	display: block;
	aspect-ratio: 1;
	border-radius: 7px;
	background-position: center;
	background-size: cover;
}

.pst-bgc__thumb[aria-pressed="true"] {
	border-color: var(--pst-ink);
	box-shadow: inset 0 0 0 1px var(--pst-ink);
}

.pst-bgc__slider {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pst-bgc__circles {
	display: flex;
	align-items: center;
	gap: 14px;
}

.pst-bgc__circles canvas {
	display: block;
	border-radius: 50%;
	background: var(--pst-tint);
}

.pst-bgc__circles canvas[data-bg="av-l"] {
	width: 104px;
	height: 104px;
}

.pst-bgc__circles canvas[data-bg="av-m"] {
	width: 48px;
	height: 48px;
}

.pst-bgc__circles canvas[data-bg="av-s"] {
	width: 32px;
	height: 32px;
}

.pst .pst-bgc__warn {
	display: flex;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--pst-line);
	border-radius: 12px;
	background: var(--pst-white);
	color: var(--pst-soft);
	font-size: 14.5px;
	line-height: 1.5;
}

.pst-bgc__warn .pst-icon {
	flex: none;
	margin-top: 1px;
	color: #9A5B00;
}
