/* ===========================================================================
   Konnect Dots :: client review form  (/review/<username>)

   Everything is scoped under .rv-page. The search page taught us why: an
   unscoped `.btn-primary` in a page stylesheet restyled the footer's
   back-to-top button, and a blanket `*` reset overrode the site font on the
   header and footer. Nothing in this file may reach outside the form.
   =========================================================================== */

.rv-page {
	background: #f8fafc;
	padding: 28px 16px 56px;
	min-height: 60vh;
}

.rv-shell {
	max-width: 680px;
	margin: 0 auto;
}

.rv-card {
	background: #fff;
	border: 1px solid #e8edf3;
	border-radius: 16px;
	padding: 22px;
	margin-bottom: 16px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

/* ---- who is being reviewed ---- */

.rv-intro {
	display: flex;
	align-items: center;
	gap: 16px;
}

.rv-avatar {
	width: 62px;
	height: 62px;
	border-radius: 50%;
	object-fit: cover;
	flex: 0 0 auto;
	background: #eef2f7;
}

.rv-avatar--letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #1e3a8a;
	color: #fff;
	font-size: 26px;
	font-weight: 700;
}

.rv-eyebrow {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #94a3b8;
}

.rv-name {
	margin: 0;
	font-size: 21px;
	line-height: 1.25;
	font-weight: 700;
	color: #0f172a;
}

.rv-sub {
	margin: 3px 0 0;
	font-size: 13px;
	color: #64748b;
}

/* ---- sections ---- */

.rv-section__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid #eef2f7;
}

.rv-section__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 12px;
	font-weight: 700;
}

.rv-section__num--last {
	background: #dcfce7;
	color: #15803d;
}

.rv-section__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: .01em;
}

/* ---- one question ---- */

.rv-q {
	padding: 16px 0;
	border-bottom: 1px dashed #eef2f7;
}

.rv-q:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.rv-q.is-invalid {
	background: #fef2f2;
	border-radius: 10px;
	padding-left: 12px;
	padding-right: 12px;
	border-bottom-color: transparent;
}

.rv-q__text {
	margin: 0 0 12px;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
}

.rv-q__error {
	margin: 8px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: #dc2626;
}

/* ---- stars ----

   The inputs are rendered 5 first and flipped with row-reverse, so a label can
   light up the stars to its left with the general sibling combinator. There is
   no JavaScript behind this. */

.rv-rating {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
}

.rv-stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	border: 0;
	margin: 0;
	padding: 0;
	min-width: 0;   /* fieldset defaults to min-content, which breaks the flex row */
}

.rv-stars__input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.rv-stars__star {
	cursor: pointer;
	padding: 2px;
	line-height: 0;
	color: #dbe3ec;
	transition: color .12s, transform .12s;
}

.rv-stars__star svg {
	width: 30px;
	height: 30px;
	fill: currentColor;
	display: block;
}

.rv-stars__star:hover,
.rv-stars__star:hover ~ .rv-stars__star,
.rv-stars__input:checked ~ .rv-stars__star {
	color: #f59e0b;
}

.rv-stars__star:active {
	transform: scale(.9);
}

/* keyboard users get a visible ring, since the input itself is off-screen */
.rv-stars__input:focus-visible + .rv-stars__star {
	outline: 2px solid #1e3a8a;
	outline-offset: 2px;
	border-radius: 4px;
}

/* The meaning of the star being hovered or chosen. A min-width stops the row
   jumping as the caption changes length between "Good" and "Needs
   improvement". */
.rv-caption {
	font-size: 12px;
	font-weight: 700;
	color: #b45309;
	letter-spacing: .01em;
	min-width: 118px;
}

/* ---- not applicable ---- */

.rv-na__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.rv-na__label {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	border: 1.5px solid #e2e8f0;
	border-radius: 999px;
	padding: 5px 12px;
	cursor: pointer;
	transition: all .15s;
}

.rv-na__label:hover {
	border-color: #cbd5e1;
}

.rv-na__input:checked + .rv-na__label {
	background: #1e3a8a;
	border-color: #1e3a8a;
	color: #fff;
}

.rv-na__input:focus-visible + .rv-na__label {
	outline: 2px solid #1e3a8a;
	outline-offset: 2px;
}

/* ---- choice questions (Anchor / Organizer / Both, Yes / Maybe / No) ---- */

.rv-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.rv-choice__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.rv-choice {
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 9px 16px;
	cursor: pointer;
	transition: all .15s;
}

.rv-choice:hover {
	border-color: #c7d2fe;
	background: #f8fafc;
}

.rv-choice__input:checked + .rv-choice {
	background: #1e3a8a;
	border-color: #1e3a8a;
	color: #fff;
}

.rv-choice__input:focus-visible + .rv-choice {
	outline: 2px solid #1e3a8a;
	outline-offset: 2px;
}

/* ---- name + mobile ---- */

.rv-hint {
	margin: 0 0 16px;
	font-size: 13px;
	color: #64748b;
	line-height: 1.5;
}

.rv-field {
	margin-bottom: 16px;
}

.rv-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #94a3b8;
	margin-bottom: 6px;
}

.rv-input {
	width: 100%;
	font-family: 'Segoe UI', sans-serif;
	font-size: 14px;
	color: #1e293b;
	background: #fff;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 11px 13px;
	transition: border-color .15s;
}

.rv-input:focus {
	outline: none;
	border-color: #1e3a8a;
}

.rv-field.is-invalid .rv-input {
	border-color: #dc2626;
}

.rv-input-group {
	display: flex;
	align-items: stretch;
}

.rv-prefix {
	display: inline-flex;
	align-items: center;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
	background: #f1f5f9;
	border: 1.5px solid #e2e8f0;
	border-right: none;
	border-radius: 10px 0 0 10px;
}

.rv-input-group .rv-input {
	border-radius: 0 10px 10px 0;
}

.rv-privacy {
	margin: 0 0 20px;
	font-size: 12px;
	line-height: 1.6;
	color: #94a3b8;
}

.rv-privacy a {
	color: #1e3a8a;
	text-decoration: underline;
}

/* ---- buttons ---- */

.rv-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.rv-actions--next {
	justify-content: flex-end;
	margin-top: 4px;
}

.rv-btn {
	font-family: 'Segoe UI', sans-serif;
	font-size: 14px;
	font-weight: 700;
	border-radius: 10px;
	padding: 12px 26px;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: background .15s, border-color .15s;
}

.rv-btn--primary {
	background: #1e3a8a;
	color: #fff;
}

.rv-btn--primary:hover {
	background: #1e40af;
}

.rv-btn--ghost {
	background: #fff;
	border-color: #e2e8f0;
	color: #475569;
}

.rv-btn--ghost:hover {
	border-color: #cbd5e1;
}

/* ---- messages ---- */

.rv-alert {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 13px;
	font-weight: 600;
	border-radius: 12px;
	padding: 13px 16px;
	margin-bottom: 16px;
}

.rv-empty {
	text-align: center;
	color: #64748b;
	font-size: 14px;
}

/* ---- thank you ---- */

.rv-done {
	text-align: center;
	padding: 40px 24px;
}

.rv-done__tick {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #dcfce7;
	color: #15803d;
	font-size: 28px;
	margin-bottom: 16px;
}

.rv-done__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
}

.rv-done__text {
	margin: 0 auto 22px;
	max-width: 400px;
	font-size: 14px;
	line-height: 1.6;
	color: #64748b;
}

/* ---- free-text box ---- */

.rv-textarea {
	resize: vertical;
	min-height: 96px;
	line-height: 1.55;
	font-size: 14px;
}

.rv-optional {
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	color: #cbd5e1;
	margin-left: 4px;
}

.rv-section__num--note {
	background: #fef3c7;
	color: #b45309;
}

/* ---- honeypot ----

   Off-screen rather than display:none: some bots skip inputs that are not
   rendered, and this one is meant to be filled in. */
.rv-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* screen-reader-only text */
.rv-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---- step flow (only once the script is running) ---- */

.rv-form.is-stepped .rv-step {
	display: none;
}

.rv-form.is-stepped .rv-step.is-active {
	display: block;
}

/* ---- small screens ---- */

@media (max-width: 560px) {
	.rv-page {
		padding: 16px 12px 40px;
	}

	.rv-card {
		padding: 18px 16px;
		border-radius: 14px;
	}

	.rv-intro {
		gap: 12px;
	}

	.rv-avatar {
		width: 52px;
		height: 52px;
	}

	.rv-name {
		font-size: 18px;
	}

	/* thumbs need a bigger target than a mouse does */
	.rv-stars__star svg {
		width: 34px;
		height: 34px;
	}

	.rv-rating {
		gap: 10px 12px;
	}

	.rv-btn {
		flex: 1 1 auto;
		text-align: center;
	}
}
