/* LaundryFlow demo: two phones on one page. Builds on styles.css tokens. */

.lf {
	--chat: #e9e4d6;
	--bubble-in: #fffdf7;
	--bubble-out: #dce6cf;
	--phone-edge: var(--ink);
}

/* Hero ------------------------------------------------------------------ */
.lf-hero {
	display: grid;
	grid-template-columns: 1.1fr 1fr;
	gap: 60px;
	align-items: end;
	padding-top: 72px;
	padding-bottom: 64px;
}
.lf-hero h1 {
	font-size: clamp(48px, 5.6vw, 92px);
	line-height: 1;
	letter-spacing: -2px;
	margin-top: 22px;
}
.lf-hero p:not(.eyebrow) {
	color: var(--muted);
	line-height: 1.8;
	margin-top: 24px;
	max-width: 520px;
}
.lf-hero .eyebrow a {
	border-bottom: 1px solid currentColor;
}
.lf-hero .lf-note {
	font-family: var(--mono);
	font-size: 11px;
	line-height: 1.7;
	padding-left: 14px;
	border-left: 2px solid var(--fern);
}
.lf-choose {
	display: grid;
	gap: 14px;
}
.lf-role {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: 20px;
	align-items: center;
	text-align: left;
	padding: 22px 24px;
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--line);
	transition:
		border-color 0.2s,
		background 0.2s,
		transform 0.2s;
}
.lf-role:hover,
.lf-role[aria-pressed="true"] {
	border-color: var(--moss);
	background: #fff;
}
.lf-role:hover {
	transform: translateY(-2px);
}
.lf-role:hover .arrow {
	transform: translate(3px, -3px);
}
.lf-role strong {
	display: block;
	font-size: 20px;
	font-weight: 500;
	letter-spacing: -0.4px;
}
.lf-role span span {
	display: block;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
	margin-top: 4px;
}
.lf-role-code {
	font-family: var(--mono);
	font-size: 11px;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 1px solid currentColor;
	color: var(--moss);
}
.lf-role[aria-pressed="true"] .lf-role-code {
	background: var(--moss);
	border-color: var(--moss);
	color: var(--paper);
}

/* Stage ----------------------------------------------------------------- */
.lf-stage {
	padding-bottom: 40px;
}
.lf-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 18px 30px;
	padding: 18px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.lf-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 26px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--muted);
}
.lf-steps li {
	display: flex;
	align-items: center;
	gap: 8px;
}
.lf-steps li span {
	font-family: var(--mono);
	font-size: 10px;
	padding: 2px 5px;
	border: 1px solid var(--line);
}
.lf-steps li.is-done {
	color: var(--ink);
}
.lf-steps li.is-done span {
	background: var(--fern);
	border-color: var(--fern);
	color: #fff;
}
.lf-steps li.is-current {
	color: var(--ink);
	font-weight: 500;
}
.lf-steps li.is-current span {
	background: var(--moss);
	border-color: var(--moss);
	color: #fff;
}
.lf-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
	font-size: 13px;
}
.lf-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.lf-switch input {
	accent-color: var(--moss);
	width: 16px;
	height: 16px;
	margin: 0;
}
.lf-restart {
	background: none;
	border: 0;
	border-bottom: 1px solid currentColor;
	padding: 4px 0;
	color: var(--ink);
	font-size: 13px;
}
.lf-restart:hover {
	color: var(--moss);
}
.lf-hint {
	margin: 22px 0 26px;
	font-size: 17px;
	line-height: 1.5;
	min-height: 1.5em;
	max-width: 760px;
}
.lf-hint strong {
	font-weight: 600;
	color: var(--moss-dark);
}
.lf-error {
	margin-top: 18px;
	padding: 12px 16px;
	border-left: 3px solid var(--clay);
	background: #fff;
	font-size: 14px;
}
.lf-error button {
	margin-left: 10px;
}
.lf-tabs {
	display: none;
}
.lf-phones {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 400px));
	justify-content: center;
	gap: clamp(28px, 6vw, 96px);
}

/* Phone ----------------------------------------------------------------- */
.lf-phone-label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 12px;
}
.lf-phone-label strong {
	font-weight: 500;
	font-size: 15px;
}
.lf-phone-label .small-label {
	color: var(--muted);
}
.lf-phone-label .is-you {
	color: var(--moss);
}
.lf-phone {
	position: relative;
	display: flex;
	flex-direction: column;
	height: min(680px, 78vh);
	min-height: 520px;
	border: 9px solid var(--phone-edge);
	border-radius: 38px;
	background: var(--chat);
	overflow: hidden;
	box-shadow: 0 30px 60px -38px rgba(30, 42, 33, 0.55);
}
.lf-phone.is-auto {
	--phone-edge: #47513f;
}
.lf-phone-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 16px 12px;
	background: var(--moss-dark);
	color: var(--paper);
}
.lf-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--paper);
	color: var(--moss-dark);
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 500;
	flex: none;
}
.lf-phone-head strong {
	display: block;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
}
.lf-phone-head span {
	font-size: 11px;
	opacity: 0.75;
}
.lf-log {
	flex: 1;
	overflow-y: auto;
	padding: 14px 12px 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
}
.lf-empty {
	margin: auto;
	text-align: center;
	color: var(--muted);
	font-size: 13px;
	max-width: 240px;
}
.lf-msg {
	max-width: 86%;
	display: flex;
	flex-direction: column;
	gap: 4px;
	animation: lf-in 0.22s ease-out;
}
.lf-msg.in {
	align-self: flex-start;
}
.lf-msg.out {
	align-self: flex-end;
}
.lf-bubble {
	padding: 8px 11px 6px;
	border-radius: 10px;
	background: var(--bubble-in);
	font-size: 13.5px;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	box-shadow: 0 1px 0 rgba(30, 42, 33, 0.08);
}
.lf-msg.in .lf-bubble {
	border-top-left-radius: 3px;
}
.lf-msg.out .lf-bubble {
	background: var(--bubble-out);
	border-top-right-radius: 3px;
}
.lf-bubble .lf-time {
	display: block;
	text-align: right;
	font-family: var(--mono);
	font-size: 9.5px;
	color: var(--muted);
	margin-top: 2px;
}
.lf-bubble .lf-footer {
	display: block;
	color: var(--muted);
	font-size: 12px;
	margin-top: 4px;
}
.lf-bubble em {
	/* WhatsApp italics, not the site's hatched emphasis. */
	font-family: inherit;
	font-style: italic;
	font-weight: inherit;
	font-stretch: inherit;
	background: none;
	padding: 0;
}
.lf-bubble a {
	color: var(--moss);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.lf-bubble img {
	display: block;
	width: 140px;
	height: 140px;
	image-rendering: pixelated;
	margin: 4px 0;
	background: #fff;
}
.lf-tapped {
	font-style: italic;
}
.lf-tapped::before {
	content: "↳ ";
	font-style: normal;
	color: var(--muted);
}
.lf-buttons {
	display: grid;
	gap: 4px;
}
.lf-btn {
	padding: 9px 10px;
	border: 0;
	border-radius: 8px;
	background: var(--bubble-in);
	color: var(--moss);
	font-size: 13.5px;
	font-weight: 500;
	box-shadow: 0 1px 0 rgba(30, 42, 33, 0.08);
	transition: background 0.15s;
}
.lf-btn:hover:not(:disabled) {
	background: #fff;
}
.lf-btn:disabled {
	cursor: default;
	color: var(--muted);
	opacity: 0.7;
}
.lf-btn.is-forward {
	background: var(--moss);
	color: var(--paper);
}
.lf-forward {
	align-self: stretch;
	max-width: none;
	padding: 12px;
	border: 1px dashed var(--muted);
	border-radius: 10px;
	font-size: 13px;
	background: rgba(255, 255, 255, 0.45);
}
.lf-forward .small-label {
	color: var(--muted);
	display: block;
	margin-bottom: 6px;
}
.lf-forward p {
	margin-bottom: 8px;
	white-space: pre-wrap;
}
.lf-typing {
	align-self: flex-start;
	padding: 9px 14px;
	border-radius: 10px;
	background: var(--bubble-in);
	display: flex;
	gap: 4px;
}
.lf-typing i {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--muted);
	animation: lf-dot 1s infinite ease-in-out;
}
.lf-typing i:nth-child(2) {
	animation-delay: 0.15s;
}
.lf-typing i:nth-child(3) {
	animation-delay: 0.3s;
}

/* Composer -------------------------------------------------------------- */
.lf-chips {
	display: flex;
	gap: 6px;
	padding: 6px 10px 0;
	overflow-x: auto;
	scrollbar-width: none;
}
.lf-chips:empty {
	display: none;
}
.lf-chip {
	flex: none;
	max-width: 260px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	padding: 5px 11px;
	border: 1px solid var(--moss);
	border-radius: 999px;
	background: #fff;
	color: var(--moss-dark);
	font-size: 12px;
}
.lf-chip:hover {
	background: var(--moss);
	color: var(--paper);
}
.lf-compose {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 8px 10px 12px;
}
.lf-compose textarea {
	flex: 1;
	resize: none;
	min-height: 40px;
	max-height: 120px;
	padding: 9px 14px;
	border: 0;
	border-radius: 20px;
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	line-height: 1.5;
	outline-offset: 2px;
}
.lf-send {
	width: 40px;
	height: 40px;
	flex: none;
	border: 0;
	border-radius: 50%;
	background: var(--moss);
	color: var(--paper);
	display: grid;
	place-items: center;
}
.lf-send .arrow {
	width: 16px;
	height: 16px;
}
.lf-send:disabled {
	opacity: 0.5;
}

/* List picker: WhatsApp's list message opens as a sheet ---------------- */
.lf-sheet {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	background: rgba(30, 42, 33, 0.35);
	z-index: 2;
}
.lf-sheet-panel {
	background: var(--paper);
	border-radius: 16px 16px 0 0;
	padding: 14px 0 10px;
	max-height: 80%;
	overflow-y: auto;
}
.lf-sheet-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 16px 10px;
	font-weight: 500;
}
.lf-sheet-head button {
	border: 0;
	background: none;
	font-size: 22px;
	line-height: 1;
	color: var(--muted);
}
.lf-option {
	display: block;
	width: 100%;
	text-align: left;
	padding: 11px 16px;
	border: 0;
	border-top: 1px solid var(--line);
	background: none;
	color: var(--ink);
}
.lf-option:hover {
	background: #fff;
}
.lf-option strong {
	display: block;
	font-weight: 500;
	font-size: 14px;
}
.lf-option span {
	font-size: 12px;
	color: var(--muted);
}

/* What you are seeing -------------------------------------------------- */
.lf-how-list {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0;
	margin: 56px 0 44px;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--line);
}
.lf-how-list li {
	padding: 26px 26px 0 0;
}
.lf-how-list li + li {
	padding-left: 26px;
	border-left: 1px solid var(--line);
}
.lf-how-list span {
	font-family: var(--mono);
	font-size: 10px;
	color: var(--moss);
}
.lf-how-list h3 {
	font-size: 19px;
	margin: 10px 0 8px;
	letter-spacing: -0.3px;
}
.lf-how-list p {
	color: var(--muted);
	font-size: 14px;
}

@keyframes lf-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
}
@keyframes lf-dot {
	0%,
	80%,
	100% {
		opacity: 0.3;
	}
	40% {
		opacity: 1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.lf-msg,
	.lf-typing i {
		animation: none;
	}
	.lf-log {
		scroll-behavior: auto;
	}
}
.a11y-still .lf-msg,
.a11y-still .lf-typing i {
	animation: none;
}
.a11y-contrast .lf-bubble,
.a11y-contrast .lf-btn,
.a11y-contrast .lf-compose textarea {
	border: 1px solid currentColor;
}

@media (max-width: 1100px) {
	.lf-hero {
		grid-template-columns: 1fr;
		gap: 40px;
		align-items: start;
	}
	.lf-how-list {
		grid-template-columns: repeat(2, 1fr);
	}
	.lf-how-list li:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}
	.lf-how-list li:nth-child(n + 3) {
		margin-top: 26px;
		border-top: 1px solid var(--line);
	}
}
@media (max-width: 860px) {
	.lf-tabs {
		display: grid;
		grid-template-columns: 1fr 1fr;
		margin-bottom: 16px;
		border: 1px solid var(--line);
	}
	.lf-tabs button {
		position: relative;
		padding: 10px;
		border: 0;
		background: none;
		color: var(--muted);
		font-size: 13px;
	}
	.lf-tabs button[aria-selected="true"] {
		background: var(--ink);
		color: var(--paper);
	}
	.lf-tabs button.has-unread::after {
		content: "";
		position: absolute;
		top: 9px;
		right: 12px;
		width: 7px;
		height: 7px;
		border-radius: 50%;
		background: var(--clay);
	}
	.lf-phones {
		grid-template-columns: minmax(0, 420px);
	}
	.lf-phone-wrap:not(.is-active) {
		display: none;
	}
}
@media (max-width: 600px) {
	.lf-hero {
		padding-top: 40px;
	}
	.lf-how-list {
		grid-template-columns: 1fr;
	}
	.lf-how-list li,
	.lf-how-list li + li {
		padding: 22px 0 0;
		border-left: 0;
	}
	.lf-how-list li + li {
		margin-top: 22px;
		border-top: 1px solid var(--line);
	}
	.lf-phone {
		height: 72vh;
		min-height: 460px;
		border-width: 6px;
		border-radius: 28px;
	}
}
