/**
 * Contact page: messenger-style box ([tp_contact], inc/contact.php). Brand blue #155dff, TPTrue radii.
 */

.tp-chat {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	height: 600px; /* fixed: the box never changes size (log scrolls, form <-> sent state swap inside) */
	margin: 0;
	overflow: hidden;
	box-sizing: border-box;
	background: #fbfbf5;
	/* a real border: an inset shadow on the box is painted under the children's backgrounds and only shows in the gaps */
	border: 1px solid #dbe5fb;
	border-radius: 20px;
	box-shadow: 0 24px 56px -20px rgba(21, 93, 255, 0.3);
}

.tp-chat__head {
	flex: none;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	color: #fff;
	background: linear-gradient(135deg, #155dff 0%, #0e4ae0 100%);
}

.tp-chat__avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 38px;
	height: 38px;
	font-size: 20px;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 50%;
}

.tp-chat__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: inherit;
}

.tp-chat__sub {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 2px 0 0;
	font-size: 12px;
	opacity: 0.9;
}

/* Message log: Shopify look (cream canvas, white/black pill bubbles, aloe + pistachio accents, hairline #e4e4e7, Inter) */
.tp-chat__log {
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 0 1 200px;
	min-height: 120px;
	padding: 16px;
	overflow-y: auto;
	font-family: "Inter Variable", "Inter", Helvetica, Arial, sans-serif;
	font-feature-settings: "ss03";
	background: #fbfbf5;
}

.tp-chat__msg {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 86%;
	animation: tp-chat-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tp-chat__msg--them {
	align-self: flex-start;
}

.tp-chat__msg--me {
	align-items: flex-end;
	align-self: flex-end;
}

.tp-chat__who,
.tp-chat__meta {
	padding: 0 6px;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.72px;
	color: #71717a;
}

.tp-chat__who {
	text-transform: uppercase;
}

.tp-chat__meta {
	letter-spacing: 0;
}

.tp-chat__bubble {
	margin: 0;
	padding: 10px 14px;
	font-size: 14px;
	font-weight: 420;
	line-height: 1.5;
	overflow-wrap: anywhere;
	border-radius: 20px;
}

.tp-chat__msg--them .tp-chat__bubble {
	color: #000;
	background: #fff;
	border-bottom-left-radius: 6px;
	box-shadow: inset 0 0 0 1px #e4e4e7;
}

.tp-chat__msg--me .tp-chat__bubble {
	color: #fff;
	white-space: pre-wrap;
	background: #000;
	border-bottom-right-radius: 6px;
}

/* the product the visitor asks about: pistachio card with an aloe tag */
.tp-chat__product {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px 8px 8px;
	background: #d4f9e0;
	border-radius: 16px;
}

.tp-chat__product img,
.tp-chat__product i {
	flex: none;
	width: 40px;
	height: 40px;
	object-fit: cover;
	background: #fff;
	border-radius: 10px;
}

.tp-chat__product span {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	font-size: 14px;
	font-weight: 550;
	line-height: 1.3;
	color: #000;
}

.tp-chat__tag {
	align-self: flex-start;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.72px;
	text-transform: uppercase;
	background: #c1fbd4;
	border-radius: 9999px;
}

/* typing dots before the reply */
.tp-chat__typing {
	display: inline-flex;
	gap: 4px;
	padding: 14px 16px;
	background: #fff;
	border-radius: 20px 20px 20px 6px;
	box-shadow: inset 0 0 0 1px #e4e4e7;
}

.tp-chat__typing i {
	width: 6px;
	height: 6px;
	background: #a1a1aa;
	border-radius: 50%;
	animation: tp-chat-dot 1s infinite ease-in-out;
}

.tp-chat__typing i:nth-child(2) {
	animation-delay: 0.15s;
}

.tp-chat__typing i:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes tp-chat-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@keyframes tp-chat-dot {
	0%,
	60%,
	100% {
		opacity: 0.35;
		transform: translateY(0);
	}

	30% {
		opacity: 1;
		transform: translateY(-3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tp-chat__msg,
	.tp-chat__typing i {
		animation: none;
	}
}

.tp-chat__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: none;
	margin-top: auto; /* log at the top, form pinned to the bottom, free space between */
	padding: 14px 16px 16px;
	background: #fff;
	border-top: 1px solid #e4e4e7;
}

.tp-chat__form[hidden] {
	display: none;
}

.tp-chat__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.tp-chat__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tp-chat__field > span {
	font-size: 13px;
	font-weight: 500;
	color: #5b6475;
}

.tp-chat__field input,
.tp-chat__field textarea {
	width: 100%;
	margin: 0;
	padding: 8px 12px;
	font: inherit;
	font-size: 14px;
	color: #1f3147;
	background: #f4f7fc;
	border: 1px solid #d8dee7;
	border-radius: 14px;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.tp-chat__field textarea {
	min-height: 72px;
	resize: none;
}

.tp-chat__field input:focus,
.tp-chat__field textarea:focus {
	outline: none;
	background: #fff;
	border-color: #155dff;
	box-shadow: 0 0 0 3px rgba(21, 93, 255, 0.16);
}

.tp-chat__field .is-invalid {
	border-color: #dc3545;
}

.tp-chat__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tp-chat__error {
	margin: 0;
	font-size: 13px;
	color: #dc3545;
}

.tp-chat__error[hidden] {
	display: none;
}

.tp-chat__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	align-self: flex-end;
	padding: 8px 18px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	background: #155dff;
	border: 0;
	border-radius: 9999px;
	transition: background-color 0.2s;
}

.tp-chat__send:hover {
	background: #3e6fff;
}

.tp-chat__send:disabled {
	cursor: default;
	background: #a9b1bf;
}

.tp-chat__send .tp-icon {
	width: 18px;
	height: 18px;
}

.tp-chat__alt {
	margin: 0;
	padding: 4px 20px 16px;
	font-size: 13px;
	color: #5b6475;
}

@media (max-width: 480px) {
	.tp-chat {
		border-radius: 16px;
	}

	.tp-chat__row {
		grid-template-columns: 1fr;
	}
}

/* ---------- Two-column page ---------- */

/* a soft blue wash behind the top of the page; one accent, tinted to the brand blue */
body:has(.tp-content--contact) {
	background: linear-gradient(180deg, #eaf0ff 0, #f6f8ff 360px, #fff 640px) no-repeat;
}


.tp-content--contact {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 64px 24px 96px;
	color: #1f3147;
}

.tp-contact-page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
	gap: 64px;
	align-items: stretch;
}

.tp-contact-page__info {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	min-width: 0;
}

.tp-contact-page__title {
	margin: 0;
	font-size: clamp(32px, 3.6vw, 44px);
	font-weight: 500;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.tp-contact-page__lead {
	max-width: 46ch;
	margin: 16px 0 0;
	font-size: 17px;
	line-height: 1.6;
	color: #5b6475;
}

.tp-contact-page__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
	padding: 24px;
	list-style: none;
}

/* white card, shadow tinted to the brand blue (not black) */
.tp-contact-page__card {
	background: #fff;
	border-radius: 20px;
	box-shadow: inset 0 0 0 1px #dbe5fb, 0 16px 40px -16px rgba(21, 93, 255, 0.22);
}

.tp-contact-page__list li {
	display: flex;
	align-items: center;
	gap: 16px;
	font-size: 14px;
	line-height: 1.45;
	color: #5b6475;
}

.tp-contact-page__list .tp-icon {
	flex: none;
	box-sizing: content-box;
	width: 20px;
	height: 20px;
	padding: 11px;
	color: #fff;
	background: #155dff;
	border-radius: 14px;
}

.tp-contact-page__list strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #1f3147;
}

.tp-contact-page__list a {
	color: #155dff;
}

@media (max-width: 900px) {
	.tp-chat {
		height: 620px;
	}

	.tp-content--contact {
		padding: 32px 16px 64px;
	}

	.tp-contact-page {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.tp-contact-page__list {
		padding: 20px;
	}

	.tp-chat {
		max-width: none;
	}
}

/* ---------- Product picker (About a product) ---------- */

.tp-pick {
	position: relative;
}

.tp-pick > label {
	font-size: 13px;
	font-weight: 500;
	color: #5b6475;
}

.tp-pick > label em {
	font-style: normal;
	color: #8a93a3;
}

.tp-pick__chosen {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	background: #e8efff;
	border-radius: 14px;
}

.tp-pick__chosen[hidden] {
	display: none;
}

.tp-pick__chosen img,
.tp-pick__thumb {
	flex: none;
	width: 36px;
	height: 36px;
	object-fit: cover;
	background: #f4f7fc;
	border-radius: 8px;
}

.tp-pick__chosen b {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	color: #0e4ae0;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tp-pick__x {
	display: grid;
	flex: none;
	place-items: center;
	width: 28px;
	height: 28px;
	padding: 0;
	color: #0e4ae0;
	cursor: pointer;
	background: none;
	border: 0;
	border-radius: 50%;
}

.tp-pick__x:hover {
	background: #fff;
}

.tp-pick__x .tp-icon {
	width: 14px;
	height: 14px;
}

.tp-pick__input[hidden] {
	display: none;
}

.tp-pick__list {
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	z-index: 10;
	max-height: 260px;
	margin: 4px 0 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border-radius: 14px;
	box-shadow: inset 0 0 0 1px #d8dee7, 0 12px 28px rgba(31, 49, 71, 0.14);
}

.tp-pick__list[hidden] {
	display: none;
}

.tp-pick__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 8px;
	font-size: 14px;
	cursor: pointer;
	border-radius: 10px;
}

.tp-pick__opt:hover,
.tp-pick__opt.is-active {
	background: #f4f7fc;
}

.tp-pick__opt.is-active {
	box-shadow: 0 0 0 2px #155dff;
}

.tp-pick__opt span {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tp-pick__opt small {
	flex: none;
	font-size: 13px;
	color: #5b6475;
}

.tp-pick__opt del {
	margin-right: 4px;
}

.tp-pick__opt ins {
	text-decoration: none;
}

.tp-pick__empty {
	padding: 10px;
	font-size: 13px;
	color: #5b6475;
}

/* messages sit at the bottom of the log, like a chat app */
.tp-chat__log > :first-child {
	margin-top: auto;
}

/* after sending the form is gone: the log takes its space so the box keeps its size */
.tp-chat:has(.tp-chat__form[hidden]) .tp-chat__log {
	flex: 1 1 auto;
}

.tp-chat__form .tp-turnstile {
	box-sizing: border-box;
	width: 100%;
	min-height: 65px;
	overflow: hidden; /* clips the widget's own square border; ours matches the inputs */
	border: 1px solid #d8dee7;
	border-radius: 14px;
}

.tp-chat__form .tp-turnstile iframe {
	display: block;
	width: calc(100% + 2px) !important; /* the widget sets an inline width */
	max-width: none;
	margin: -1px;
}

.tp-contact-page__biz {
	padding: 24px;
	font-size: 14px;
	line-height: 1.5;
	color: #5b6475;
}

.tp-contact-page__biz-title {
	margin: 0 0 12px;
	font-size: 16px;
	color: #0f172a;
}

.tp-contact-page__biz dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 16px;
	margin: 0;
}

.tp-contact-page__biz dt {
	font-weight: 600;
	color: #0f172a;
}

.tp-contact-page__biz dd {
	margin: 0;
	overflow-wrap: anywhere;
}
