/* Profile picture frame: the photo with its frame on the stage, the preview of the round file and the frame options.
   The layout around them (.pst-photo) is shared and lives in assets/css/tools.css.
   ========================================================================== */

/* The stage: the frame is drawn by tool.js on a canvas over the photo, with the area outside it dimmed. */
.pst-fr__over {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.pst-fr__preview {
	display: flex;
	align-items: center;
	gap: 18px;
}

/* The square of the file itself: the chequered pattern shows through where it is transparent. */
.pst-fr__tile {
	display: grid;
	flex: none;
	place-items: center;
	width: 128px;
	height: 128px;
	border: 1px solid var(--pst-line);
	border-radius: 14px;
	background-color: var(--pst-white);
	background-image:
		linear-gradient(45deg, #E9E3D8 25%, transparent 25%, transparent 75%, #E9E3D8 75%),
		linear-gradient(45deg, #E9E3D8 25%, transparent 25%, transparent 75%, #E9E3D8 75%);
	background-position: 0 0, 8px 8px;
	background-size: 16px 16px;
}

.pst-fr__tile canvas {
	display: block;
	width: 112px;
	height: 112px;
}

.pst-fr__blank {
	width: 104px;
	height: 104px;
	border: 2px dashed var(--pst-line-strong);
	border-radius: 50%;
	background: var(--pst-white);
}

/* The same picture small, the way a profile, a comment and a chat show it. */
.pst-fr__uses {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.pst-fr__use {
	display: flex;
	align-items: center;
	gap: 10px;
}

.pst-fr__use canvas {
	display: block;
	flex: none;
	border-radius: 50%;
	background: var(--pst-line);
}

.pst-fr__lines {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pst-fr__lines i {
	display: block;
	width: 84px;
	height: 7px;
	border-radius: 4px;
	background: var(--pst-line);
}

.pst-fr__lines i + i {
	width: 52px;
}

/* The five kinds of frame, each with a small drawing of itself. */
.pst-fr__styles {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}

.pst-fr__style {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
	padding: 10px 4px 8px;
	border: 1.5px solid var(--pst-line);
	border-radius: 12px;
	background: var(--pst-white);
	color: var(--pst-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	text-align: center;
	/* A long name ("Színátmenetes") breaks rather than spill out of its button on a phone. */
	hyphens: auto;
	overflow-wrap: anywhere;
	cursor: pointer;
}

.pst-fr__style svg {
	width: 36px;
	height: 36px;
}

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

.pst-fr__style:focus-visible {
	outline: 3px solid var(--pst-accent, #FFB224);
	outline-offset: 2px;
}

/* A gradient chip shows its two colours. */
.pst-fr__grad {
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--a), var(--b));
	box-shadow: inset 0 0 0 1px rgba(15, 27, 51, 0.16);
}

.pst-fr__pair {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

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

.pst-fr__text .pst-input {
	height: 44px;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.pst-fr__ideas .pst-chip {
	font-size: 13px;
}

@container pst (max-width: 450px) {
	.pst-fr__preview {
		gap: 14px;
	}

	.pst-fr__tile {
		width: 112px;
		height: 112px;
	}

	.pst-fr__tile canvas {
		width: 96px;
		height: 96px;
	}

	.pst-fr__styles {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.pst-fr__style {
		font-size: 12px;
	}
}

/* Groups that do not belong to the chosen frame are hidden. */
.pst-fr [hidden] {
	display: none !important;
}

/* With two colours the pairs show as halves, not as a blend. */
.pst-fr.is-split .pst-fr__grad {
	background: linear-gradient(90deg, var(--a) 50%, var(--b) 50%);
}
