/* Wollman Rink NYC – Photo Frame
 * DOM is built by photo-frame.js inside the [data-wrpf] container the
 * shortcode prints. Colours are overridable per page via the custom properties.
 */

.wrpf {
	--wrpf-accent: #1a1a1a;
	--wrpf-accent-text: #ffffff;
	--wrpf-muted: #f2f2f2;
	--wrpf-muted-text: #1a1a1a;
	--wrpf-stage-bg: #111111;
	--wrpf-radius: 0.5em;
	--wrpf-max-width: 480px;
	max-width: var(--wrpf-max-width);
	margin: 0 auto;
	box-sizing: border-box;
}

.wrpf *,
.wrpf *::before,
.wrpf *::after {
	box-sizing: inherit;
}

.wrpf__stage {
	position: relative;
	width: 100%;
	background: var(--wrpf-stage-bg);
	border-radius: var(--wrpf-radius);
	overflow: hidden;
	/* aspect-ratio is set inline by the script from data-width/height */
}

.wrpf__canvas {
	display: block;
	width: 100%;
	height: 100%;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
	cursor: grab;
	outline: none;
}

.wrpf--has-photo .wrpf__canvas:active {
	cursor: grabbing;
}

.wrpf__canvas:focus-visible {
	box-shadow: inset 0 0 0 3px var(--wrpf-accent-text);
}

.wrpf__empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.5em;
	margin: 0;
	color: #ffffff;
	font-size: 1em;
	line-height: 1.4;
	pointer-events: none;
}

.wrpf--has-photo .wrpf__empty {
	display: none;
}

.wrpf__toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	margin-top: 1em;
}

.wrpf__btn {
	flex: 1 1 calc(50% - 0.3em);
	min-height: 48px;
	padding: 0.75em 1em;
	border: 2px solid var(--wrpf-accent);
	border-radius: var(--wrpf-radius);
	background: var(--wrpf-muted);
	color: var(--wrpf-muted-text);
	font: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.wrpf__btn--primary {
	background: var(--wrpf-accent);
	color: var(--wrpf-accent-text);
}

.wrpf__btn--wide {
	flex-basis: 100%;
}

.wrpf__btn:hover,
.wrpf__btn:focus-visible {
	transform: translateY(-1px);
}

.wrpf__btn:disabled {
	opacity: 0.45;
	cursor: default;
	transform: none;
}

.wrpf__btn[hidden] {
	display: none;
}

.wrpf__zoom {
	display: flex;
	align-items: center;
	gap: 0.75em;
	margin-top: 1em;
}

.wrpf__zoom-label {
	font-size: 0.9em;
	font-weight: 700;
	white-space: nowrap;
}

.wrpf__range {
	flex: 1 1 auto;
	width: 100%;
	min-height: 32px;
	margin: 0;
	accent-color: var(--wrpf-accent);
}

.wrpf__status,
.wrpf__hint {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	line-height: 1.4;
	text-align: center;
}

.wrpf__status:empty {
	display: none;
}

.wrpf__status--error {
	color: #b3261e;
	font-weight: 700;
}

.wrpf__hint {
	padding: 0.75em 1em;
	border-radius: var(--wrpf-radius);
	background: #fff4d6;
	color: #5a4300;
}

.wrpf__input {
	display: none;
}

.wrpf-admin-hint {
	color: #b3261e;
}

@media (prefers-reduced-motion: reduce) {
	.wrpf__btn {
		transition: none;
	}
	.wrpf__btn:hover,
	.wrpf__btn:focus-visible {
		transform: none;
	}
}

/* Printed by the shortcode as a sibling before .wrpf, so it cannot read the
 * editor's custom properties; the width matches --wrpf-max-width's default. */
.wrpf__tagline {
	max-width: 480px;
	margin: 0 auto 0.9em;
	text-align: center;
	font-size: 1.25em;
	line-height: 1.35;
}
