/* Praisewall — collection page. Mobile-first: most clients open the link on their phone. */
:root {
	--pw-accent: #6c3bff;
	--pw-ink: #17151f;
	--pw-soft: #6b6878;
	--pw-line: #e6e3ee;
	--pw-gold: #ffb800;
	--pw-radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #f7f6fb; }
body.pw-collect-body {
	margin: 0;
	min-height: 100vh;
	font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--pw-ink);
	background:
		radial-gradient(60% 40% at 50% 0%, color-mix(in srgb, var(--pw-accent) 16%, transparent), transparent 70%),
		#f7f6fb;
	padding: env(safe-area-inset-top, 0) 16px calc(32px + env(safe-area-inset-bottom, 0));
}
.pw-collect { max-width: 560px; margin: 0 auto; padding-top: 40px; }

.pw-collect-head { text-align: center; margin-bottom: 24px; }
.pw-logo { max-height: 56px; max-width: 200px; margin-bottom: 16px; }
.pw-brand {
	display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px;
	background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.06); font-weight: 600; font-size: 14px;
}
.pw-collect-head h1 { margin: 0 0 8px; font-size: clamp(26px, 6vw, 34px); line-height: 1.15; letter-spacing: -.02em; }
.pw-collect-head p { margin: 0; color: var(--pw-soft); }

.pw-form, .pw-thanks {
	background: #fff; border-radius: 24px; padding: 24px;
	box-shadow: 0 1px 2px rgba(23,21,31,.04), 0 12px 40px -12px rgba(23,21,31,.15);
}
.pw-step { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.pw-step legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; padding: 0; }

/* Stars */
.pw-stars { display: flex; justify-content: center; gap: 6px; }
.pw-star {
	width: 52px; height: 52px; padding: 4px; border: 0; background: none; cursor: pointer;
	border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.pw-star svg { width: 100%; height: 100%; fill: #e4e1ea; transition: fill .15s, transform .2s cubic-bezier(.3,1.6,.5,1); }
.pw-star.is-on svg { fill: var(--pw-gold); }
.pw-star.is-pop svg { transform: scale(1.25); }
.pw-star:focus-visible { outline: 2px solid var(--pw-accent); }
.pw-star-label { text-align: center; margin: 6px 0 0; font-weight: 600; color: var(--pw-soft); min-height: 1.5em; }

/* Tabs */
.pw-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f1eff6; margin-bottom: 12px; }
.pw-tab {
	flex: 1; padding: 10px 6px; border: 0; border-radius: 9px; background: none; font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap;
	color: var(--pw-soft); cursor: pointer;
}
.pw-tab.is-active { background: #fff; color: var(--pw-ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

textarea, input[type=text], input[type=email] {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--pw-line); border-radius: 12px;
	font: inherit; color: inherit; background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 120px; }
textarea:focus, input:focus { outline: none; border-color: var(--pw-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pw-accent) 15%, transparent); }

.pw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pw-grid label span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.pw-full { grid-column: 1 / -1; }
@media (max-width: 480px) { .pw-grid { grid-template-columns: 1fr; } }

/* Video */
.pw-cam { position: relative; aspect-ratio: 4 / 3; border-radius: var(--pw-radius); overflow: hidden; background: #17151f; }
.pw-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-cam-live { transform: scaleX(-1); }
.pw-cam-timer {
	position: absolute; top: 12px; left: 12px; padding: 4px 10px 4px 22px; border-radius: 999px;
	background: rgba(0,0,0,.55); color: #fff; font-size: 14px; font-variant-numeric: tabular-nums;
}
.pw-cam-timer::before { content: ""; position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #ff3b3b; animation: pw-blink 1s infinite; }
@keyframes pw-blink { 50% { opacity: .2; } }
.pw-cam-actions { display: flex; align-items: center; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.pw-link { color: var(--pw-accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pw-hint { color: var(--pw-soft); font-size: 14px; margin: 8px 0 0; }

/* Photo */
.pw-photo { display: flex; align-items: center; gap: 12px; margin-top: 14px; cursor: pointer; font-weight: 600; color: var(--pw-accent); }
.pw-photo-preview {
	width: 48px; height: 48px; border-radius: 50%; background: #f1eff6 center / cover;
	border: 1.5px dashed #c9c4d6; flex: none;
}
.pw-photo-preview.has-img { border: 0; }

.pw-hp { position: absolute; left: -9999px; }
.pw-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--pw-soft); margin-bottom: 16px; cursor: pointer; }
.pw-consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pw-accent); flex: none; }

.pw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 20px; border: 0; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer;
	background: var(--pw-ink); color: #fff; transition: transform .1s, filter .15s;
}
.pw-btn:active { transform: scale(.97); }
.pw-rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #ff3b3b; }
.pw-rec.is-recording::before { border-radius: 2px; }
.pw-submit { width: 100%; padding: 16px; font-size: 17px; background: var(--pw-accent); box-shadow: 0 8px 24px -8px var(--pw-accent); }
.pw-submit:hover { filter: brightness(1.08); }
.pw-submit:disabled { opacity: .6; cursor: progress; }

.pw-error { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #fff0f0; color: #b42318; font-weight: 600; font-size: 14px; }
.pw-progress { height: 6px; border-radius: 6px; background: #f1eff6; overflow: hidden; margin-top: 12px; }
.pw-progress span { display: block; height: 100%; width: 0; background: var(--pw-accent); transition: width .2s; }

/* Thanks */
.pw-thanks { text-align: center; padding: 40px 24px; animation: pw-in .5s cubic-bezier(.2,.8,.2,1); }
.pw-thanks h2 { margin: 16px 0 8px; font-size: 28px; }
.pw-thanks p { margin: 0; color: var(--pw-soft); }
.pw-thanks-icon { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--pw-accent) 12%, #fff); display: grid; place-items: center; }
.pw-thanks-icon svg { width: 36px; height: 36px; fill: var(--pw-accent); animation: pw-beat 1.2s .3s ease-in-out 2; }
@keyframes pw-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes pw-beat { 30% { transform: scale(1.25); } 60% { transform: scale(.95); } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
