/**
 * Free TikTok Likes.
 *
 * Input rules are written as `.fl .fl-input` (0-2-0) because the theme styles
 * bare `input[type="text"]` at 0-1-1 in main.css; a single class loses that
 * fight, which is what left the other tools misaligned on mobile once already.
 */

.fl {
	--fl-line: var(--hairline, #E7D8F2);
	position: relative;
	margin-block: 1.5rem;
	padding: clamp(1.15rem, 3vw, 1.85rem);
	background: var(--surface, #fff);
	border: 1px solid var(--fl-line);
	border-radius: var(--r, 16px);
	box-shadow: var(--sh-sm, 0 1px 2px #1E123310, 0 2px 6px #1E12330A);
	text-align: left;
}

.fl-step[hidden] {
	display: none;
}

.fl-label {
	display: block;
	margin-bottom: .4rem;
	font-size: .95rem;
	font-weight: 650;
	color: var(--ink, #1E1233);
}

.fl-inline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}

.fl-at {
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--muted, #7C6B94);
}

.fl .fl-input {
	flex: 1 1 12rem;
	min-width: 0;
	width: auto;
	max-width: 100%;
	padding: .7rem .85rem;
	border: 1px solid var(--fl-line);
	border-radius: var(--r-sm, 10px);
	background: var(--paper-2, #FBF7FD);
	color: var(--ink, #1E1233);
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.fl .fl-input:focus {
	outline: none;
	border-color: var(--violet, #9B23D4);
	box-shadow: 0 0 0 3px #9B23D426;
}

.fl .fl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .72rem 1.3rem;
	border: 0;
	border-radius: 999px;
	background: var(--grad, linear-gradient(120deg, #E056FD 0%, #E530B5 100%));
	color: #fff;
	font: inherit;
	font-size: .96rem;
	font-weight: 650;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform .16s, box-shadow .16s;
}

.fl .fl-btn:hover {
	transform: translateY(-1px);
	box-shadow: var(--sh-md, 0 10px 24px -8px #1E123340);
}

/* The theme sets a colour on `.svc-page a` (0-1-1), which outranked the single
   class and left this label dark on a magenta pill. */
.fl a.fl-btn,
.fl a.fl-btn:hover,
.fl a.fl-btn:focus,
.fl a.fl-btn:visited,
.fl button.fl-btn {
	color: #fff;
	text-decoration: none;
}

.fl-hint {
	margin: .6rem 0 0;
	font-size: .86rem;
	line-height: 1.5;
	color: var(--muted, #7C6B94);
}

.fl-back {
	margin-top: 1rem;
	padding: 0;
	border: 0;
	background: none;
	color: var(--muted, #7C6B94);
	font: inherit;
	font-size: .88rem;
	cursor: pointer;
	text-decoration: underline;
}

.fl-back:hover {
	color: var(--violet, #9B23D4);
}

/* ---------------- profile ---------------- */

.fl-profile {
	display: flex;
	align-items: center;
	gap: .7rem;
	margin-bottom: 1rem;
}

.fl-avatar {
	width: 2.8rem;
	height: 2.8rem;
	border-radius: 999px;
	object-fit: cover;
}

.fl-avatar-lg {
	width: 3.6rem;
	height: 3.6rem;
	margin-bottom: .75rem;
}

.fl-profile-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.fl-profile-name {
	font-weight: 700;
	color: var(--ink, #1E1233);
}

.fl-profile-handle {
	font-size: .87rem;
	color: var(--muted, #7C6B94);
}

.fl-choose {
	margin: 0 0 .9rem;
	font-size: .98rem;
	font-weight: 600;
	color: var(--ink, #1E1233);
}

/* ---------------- video grid ---------------- */

.fl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
	gap: .7rem;
}

.fl-card {
	display: flex;
	flex-direction: column;
	gap: .4rem;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.fl-card-shot {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: var(--r-sm, 10px);
	background: var(--paper, #F5ECFA);
	border: 2px solid transparent;
	transition: border-color .16s, transform .16s;
}

.fl-card-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fl-card:hover .fl-card-shot {
	transform: translateY(-2px);
}

.fl-card.is-picked .fl-card-shot {
	border-color: var(--violet, #9B23D4);
}

.fl-card-plays {
	position: absolute;
	left: .35rem;
	bottom: .35rem;
	padding: .1rem .4rem;
	border-radius: 999px;
	background: #1E1233A6;
	color: #fff;
	font-size: .72rem;
	font-weight: 600;
}

/* The tick only exists once the card is chosen. */
.fl-card-tick {
	position: absolute;
	top: .35rem;
	right: .35rem;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 999px;
	background: var(--violet, #9B23D4);
	opacity: 0;
	transform: scale(.7);
	transition: opacity .16s, transform .16s;
}

.fl-card-tick::after {
	content: "";
	position: absolute;
	left: .42rem;
	top: .28rem;
	width: .3rem;
	height: .55rem;
	border-right: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(45deg);
}

.fl-card.is-picked .fl-card-tick {
	opacity: 1;
	transform: scale(1);
}

.fl-card-desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: .8rem;
	line-height: 1.35;
	color: var(--ink-2, #4C3D66);
}

/* ---------------- finish ---------------- */

.fl-finish {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--fl-line);
}

.fl-finish[hidden] {
	display: none;
}

.fl-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------------- notices ---------------- */

.fl-notice {
	text-align: center;
}

.fl-notice-text {
	margin: 0 auto;
	max-width: 34rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ink-2, #4C3D66);
}

/* Same ticket stub as the confirmation page: one code, presented one way,
   wherever a visitor meets it. */
.fl-offer {
	margin: 1.5rem auto 0;
	max-width: 28rem;
	padding: clamp(1.25rem, 3vw, 1.6rem);
	border: 1px solid var(--hairline, #E7D8F2);
	border-radius: var(--r, 16px);
	background: var(--paper-2, #FBF7FD);
	text-align: center;
}

.fl-offer-eyebrow {
	margin: 0 0 .3rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--violet, #9B23D4);
}

.fl-offer-title {
	margin: 0 0 .5rem;
	font-size: clamp(1.15rem, 2.6vw, 1.4rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ink, #1E1233);
}

.fl-offer-lead {
	margin: 0 0 1.1rem;
	font-size: .92rem;
	line-height: 1.55;
	color: var(--ink-2, #4C3D66);
}

.fl-code {
	display: flex;
	align-items: stretch;
	max-width: 20rem;
	margin: 0 auto 1.15rem;
	border: 2px dashed var(--violet, #9B23D4);
	border-radius: var(--r-sm, 10px);
	background: var(--violet-soft, #9B23D414);
	overflow: hidden;
}

.fl-code-value {
	flex: 1 1 auto;
	padding: .8rem .5rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--ink, #1E1233);
	background: none;
	user-select: all;
}

.fl-code-copy {
	flex: 0 0 auto;
	padding: 0 .95rem;
	border: 0;
	border-left: 2px dashed var(--violet, #9B23D4);
	background: none;
	color: var(--violet, #9B23D4);
	font: inherit;
	font-size: .86rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .16s;
}

.fl-code-copy:hover {
	background: #9B23D41F;
}

.fl-code.is-copied .fl-code-copy {
	color: #15803D;
}

/* ---------------- working / error ---------------- */

.fl-working {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .6rem;
	margin-top: 1rem;
	font-size: .93rem;
	font-weight: 600;
	color: var(--ink-2, #4C3D66);
}

.fl-working[hidden] {
	display: none;
}

.fl-spinner {
	width: 1.15rem;
	height: 1.15rem;
	border: 2px solid var(--fl-line);
	border-top-color: var(--violet, #9B23D4);
	border-radius: 999px;
	animation: fl-spin .7s linear infinite;
}

@keyframes fl-spin {
	to { transform: rotate(360deg); }
}

.fl-error {
	margin: 1rem 0 0;
	padding: .7rem .85rem;
	border-radius: var(--r-sm, 10px);
	background: #D42D2D14;
	color: #B02121;
	font-size: .9rem;
}

.fl-error[hidden] {
	display: none;
}

@media (max-width: 480px) {
	.fl-grid {
		grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
	}

	.fl .fl-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fl *,
	.fl *::before,
	.fl *::after {
		transition: none !important;
	}

	.fl-spinner {
		animation-duration: 2s;
	}
}
