/* Souper Hello! — frame styles (Souper design system) */

.souper-hello {
	--sh-forge: #0f1110;
	--sh-orange: #ff6b35;
	--sh-green: #2a7d4f;
	--sh-bone: #e8e4dc;
	--sh-dim: #8a8f8b;
	max-width: 560px;
	margin-left: auto;
	margin-right: auto;
	font-family: 'DM Mono', ui-monospace, monospace;
}

.souper-hello .sh-frame {
	position: relative;
	aspect-ratio: 3 / 4;
	border: 3px solid var(--sh-orange);
	border-radius: 14px;
	background: var(--sh-forge);
	overflow: hidden;
	color: var(--sh-bone);
	box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.15), 0 20px 60px rgba(0, 0, 0, 0.45);
}

.souper-hello .sh-tag {
	position: absolute;
	top: 10px;
	left: 12px;
	z-index: 6;
	font-size: 11px;
	letter-spacing: 0.18em;
	color: var(--sh-orange);
}

.souper-hello .sh-rec {
	position: absolute;
	top: 10px;
	right: 12px;
	z-index: 6;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--sh-dim);
}
.souper-hello .sh-rec::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sh-green);
	animation: sh-blink 1.6s infinite;
}
@keyframes sh-blink {
	50% { opacity: 0.2; }
}

.souper-hello .sh-react {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: none;
	z-index: 1;
}

.souper-hello .sh-placeholder {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
	padding: 24px;
}
.souper-hello .sh-emoji {
	font-size: clamp(70px, 18vmin, 150px);
	line-height: 1;
	filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
}
.souper-hello .sh-emoji.pop {
	animation: sh-pop 0.45s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes sh-pop {
	0% { transform: scale(0.4) rotate(-12deg); }
	100% { transform: scale(1) rotate(0); }
}
.souper-hello .sh-label {
	font-family: 'Bebas Neue', Impact, sans-serif;
	font-size: clamp(24px, 5vmin, 42px);
	letter-spacing: 0.06em;
}
.souper-hello .sh-sub {
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--sh-dim);
}

.souper-hello .sh-skeleton {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	pointer-events: none;
}

.souper-hello .sh-flash {
	position: absolute;
	inset: 0;
	z-index: 4;
	background: var(--sh-orange);
	opacity: 0;
	pointer-events: none;
}
.souper-hello .sh-flash.go {
	animation: sh-flash 0.5s ease-out;
}
@keyframes sh-flash {
	0% { opacity: 0.55; }
	100% { opacity: 0; }
}

/* boot overlay */
.souper-hello .sh-boot {
	position: absolute;
	inset: 0;
	z-index: 7;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
	padding: 24px;
	background: rgba(15, 17, 16, 0.92);
}
.souper-hello .sh-boot[hidden] {
	display: none;
}
.souper-hello .sh-start {
	font-family: 'Bebas Neue', Impact, sans-serif;
	font-size: 24px;
	letter-spacing: 0.08em;
	padding: 12px 36px;
	border: 2px solid var(--sh-orange);
	border-radius: 8px;
	background: transparent;
	color: var(--sh-orange);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}
.souper-hello .sh-start:hover,
.souper-hello .sh-start:focus-visible {
	background: var(--sh-orange);
	color: var(--sh-forge);
	outline: none;
}
.souper-hello .sh-privacy {
	max-width: 34ch;
	font-size: 11px;
	line-height: 1.7;
	letter-spacing: 0.04em;
	color: var(--sh-dim);
	margin: 0;
}
.souper-hello .sh-err {
	font-size: 11px;
	color: var(--sh-orange);
	margin: 0;
}

/* stop + hud */
.souper-hello .sh-stop {
	position: absolute;
	bottom: 10px;
	right: 12px;
	z-index: 6;
	font-family: 'DM Mono', ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: 0.14em;
	padding: 5px 10px;
	border: 1px solid var(--sh-dim);
	border-radius: 6px;
	background: rgba(15, 17, 16, 0.7);
	color: var(--sh-dim);
	cursor: pointer;
}
.souper-hello .sh-stop:hover {
	border-color: var(--sh-orange);
	color: var(--sh-orange);
}
.souper-hello .sh-stop[hidden] {
	display: none;
}

.souper-hello .sh-hud {
	position: absolute;
	left: 12px;
	bottom: 12px;
	z-index: 6;
	display: flex;
	gap: 14px;
	font-size: 10px;
	letter-spacing: 0.14em;
	color: var(--sh-dim);
}
.souper-hello .sh-hud[hidden] {
	display: none;
}
.souper-hello .sh-gesture {
	color: var(--sh-orange);
}

@media ( prefers-reduced-motion: reduce ) {
	.souper-hello .sh-emoji.pop,
	.souper-hello .sh-flash.go,
	.souper-hello .sh-rec::before {
		animation: none;
	}
}

/* editor inspector rows */
.sh-clip-row {
	padding: 8px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.sh-clip-label {
	font-weight: 600;
	margin-bottom: 2px;
}
.sh-clip-help {
	font-size: 11px;
	color: #757575;
	margin-bottom: 4px;
}
.sh-clip-controls {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}
.sh-clip-intro {
	font-size: 12px;
	color: #757575;
}

/* ===== v0.2 additions ===== */

/* formats */
.souper-hello[data-format='1:1'] .sh-frame { aspect-ratio: 1 / 1; }
.souper-hello[data-format='16:9'] { max-width: 860px; }
.souper-hello[data-format='16:9'] .sh-frame { aspect-ratio: 16 / 9; }
.souper-hello[data-format='9:16'] { max-width: 420px; }
.souper-hello[data-format='9:16'] .sh-frame { aspect-ratio: 9 / 16; }

/* photo reactions */
.souper-hello .sh-photo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.souper-hello .sh-photo[hidden] { display: none; }
.souper-hello .sh-photo.pop {
	animation: sh-photopop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes sh-photopop {
	0% { transform: scale(1.15); }
	100% { transform: scale(1); }
}
.souper-hello .sh-text { position: relative; z-index: 2; }
.souper-hello .sh-placeholder.has-photo {
	justify-content: flex-end;
	padding: 0;
}
.souper-hello .sh-placeholder.has-photo .sh-text {
	width: 100%;
	padding: 40px 20px 34px;
	background: linear-gradient(transparent, rgba(15, 17, 16, 0.85));
	text-align: center;
}

/* self-view PiP */
.souper-hello .sh-self {
	position: absolute;
	top: 34px;
	right: 12px;
	width: 28%;
	max-width: 160px;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border: 2px solid var(--sh-green);
	border-radius: 8px;
	transform: scaleX(-1);
	z-index: 5;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.souper-hello .sh-self[hidden] { display: none; }

.souper-hello .sh-selfbtn {
	position: absolute;
	bottom: 10px;
	right: 74px;
	z-index: 6;
	font-family: 'DM Mono', ui-monospace, monospace;
	font-size: 10px;
	letter-spacing: 0.14em;
	padding: 5px 10px;
	border: 1px solid var(--sh-dim);
	border-radius: 6px;
	background: rgba(15, 17, 16, 0.7);
	color: var(--sh-dim);
	cursor: pointer;
}
.souper-hello .sh-selfbtn:hover {
	border-color: var(--sh-green);
	color: var(--sh-green);
}
.souper-hello .sh-selfbtn.is-on {
	border-color: var(--sh-green);
	color: var(--sh-green);
	background: rgba(42, 125, 79, 0.15);
}
.souper-hello .sh-selfbtn[hidden] { display: none; }

/* editor extras */
.sh-media-kind {
	display: inline-block;
	min-width: 44px;
	font-size: 11px;
	color: #757575;
}
@media ( prefers-reduced-motion: reduce ) {
	.souper-hello .sh-photo.pop { animation: none; }
}

/* ===== v0.2.1: crossfade for pooled videos ===== */
.souper-hello .sh-react {
	opacity: 0;
	transition: opacity 0.14s linear;
}
.souper-hello .sh-react.is-live {
	opacity: 1;
}
@media ( prefers-reduced-motion: reduce ) {
	.souper-hello .sh-react { transition: none; }
}
