/* Pixart Tour Concierge
   Palette: Vietri majolica cobalt + Amalfi lemon. Type inherits the site font. */

.ptc-root {
	--ptc-accent: #1D4E9E;
	--ptc-ink: #16243A;
	--ptc-muted: #5A6A80;
	--ptc-sea: #EEF3F9;
	--ptc-line: #D7E0EC;
	--ptc-lemon: #F2C230;
	--ptc-bottom: 20px;
	--ptc-lift: 0px;
	--ptc-shadow: rgba(29, 78, 158, 0.28);
	font-family: inherit;
	color: var(--ptc-ink);
	-webkit-font-smoothing: antialiased;
}
.ptc-root *,
.ptc-root *::before,
.ptc-root *::after { box-sizing: border-box; }

/* Theme resets (UIkit adds margins between siblings and underlines on hover). */
.ptc-root h2,
.ptc-root h3,
.ptc-root p { margin: 0; padding: 0; font-family: inherit; letter-spacing: normal; text-transform: none; }
.ptc-root a { text-decoration: none; }
.ptc-root a:hover,
.ptc-root a:focus { text-decoration: none; }
.ptc-root button { font-family: inherit; margin: 0; }

/* ---------- Dock (chat + WhatsApp + call) ---------- */
.ptc-root .ptc-dock {
	position: fixed;
	right: 20px;
	bottom: calc(var(--ptc-bottom) + var(--ptc-lift));
	z-index: 99990; /* below the Iubenda banner, which must stay on top */
	display: flex;
	align-items: center;
	gap: 10px;
	transition: bottom .2s ease, opacity .18s ease, transform .18s ease;
}
.ptc-root .ptc-launcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px 13px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ptc-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 8px 24px var(--ptc-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.ptc-root .ptc-launcher:hover { transform: translateY(-1px); box-shadow: 0 10px 28px var(--ptc-shadow); }
.ptc-root .ptc-launcher:focus-visible { outline: 3px solid var(--ptc-lemon); outline-offset: 3px; }
.ptc-root .ptc-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--ptc-lemon);
	box-shadow: 0 0 0 3px rgba(242, 194, 48, .28);
	flex: none;
}
.ptc-root .ptc-dock-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	color: var(--ptc-accent);
	border: 1px solid var(--ptc-line);
	box-shadow: 0 6px 18px rgba(22, 36, 58, .14);
	text-decoration: none;
}
.ptc-root .ptc-dock-btn:hover { border-color: var(--ptc-accent); color: var(--ptc-accent); }
.ptc-root .ptc-dock-btn:focus-visible { outline: 2px solid var(--ptc-accent); outline-offset: 2px; }
.ptc-root .ptc-dock-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ptc-root .ptc-ico { display: inline-flex; }
.ptc-root .ptc-ico svg { width: 20px; height: 20px; }
.ptc-root.is-open .ptc-dock { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* ---------- Proactive invitation ---------- */
.ptc-root .ptc-invite {
	position: fixed;
	right: 20px;
	bottom: calc(var(--ptc-bottom) + var(--ptc-lift) + 64px);
	z-index: 99990;
	display: flex;
	align-items: flex-start;
	gap: 4px;
	max-width: 290px;
	padding: 12px 8px 12px 14px;
	background: #fff;
	border: 1px solid var(--ptc-line);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(22, 36, 58, .18);
	animation: ptc-pop .25s ease;
}
.ptc-root .ptc-invite[hidden] { display: none; }
.ptc-root .ptc-invite-text { flex: 1; border: 0; background: none; padding: 0; text-align: left; font: inherit; font-size: 14.5px; line-height: 1.45; color: var(--ptc-ink); cursor: pointer; }
.ptc-root .ptc-invite-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--ptc-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ptc-root .ptc-invite-x:hover { background: var(--ptc-sea); }
.ptc-root .ptc-invite-x svg { width: 16px; height: 16px; }
@keyframes ptc-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Panel ---------- */
.ptc-root .ptc-panel {
	position: fixed;
	right: 20px;
	bottom: calc(var(--ptc-bottom) + var(--ptc-lift));
	z-index: 99991;
	width: 392px;
	height: min(660px, calc(100vh - var(--ptc-bottom) - var(--ptc-lift) - 40px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ptc-line);
	border-radius: 20px;
	box-shadow: 0 22px 56px rgba(22, 36, 58, .20);
	overflow: hidden;
	opacity: 0;
	transform: translateY(14px);
	visibility: hidden;
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.ptc-root.is-open .ptc-panel {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity .2s ease, transform .2s ease;
}

.ptc-root .ptc-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 16px 14px 14px 18px;
	border-bottom: 1px solid var(--ptc-line);
}
.ptc-root .ptc-head-text { flex: 1; min-width: 0; }
.ptc-root .ptc-title { font-size: 17px; font-weight: 650; line-height: 1.25; color: var(--ptc-ink); }
.ptc-root .ptc-sub { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--ptc-muted); }
.ptc-root .ptc-icon-btn {
	flex: none;
	height: 36px;
	min-width: 36px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--ptc-muted);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ptc-root .ptc-icon-btn:hover { background: var(--ptc-sea); color: var(--ptc-ink); }
.ptc-root .ptc-icon-btn:focus-visible { outline: 2px solid var(--ptc-accent); outline-offset: 1px; }
.ptc-root .ptc-icon-btn svg { width: 18px; height: 18px; }

/* ---------- Conversation ---------- */
.ptc-root .ptc-log {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.ptc-root .ptc-msg {
	max-width: 86%;
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 15px;
	line-height: 1.5;
	overflow-wrap: anywhere;
}
.ptc-root .ptc-msg.is-bot { align-self: flex-start; background: var(--ptc-sea); color: var(--ptc-ink); border-bottom-left-radius: 6px; }
.ptc-root .ptc-msg.is-user { align-self: flex-end; background: var(--ptc-accent); color: #fff; border-bottom-right-radius: 6px; }
.ptc-root .ptc-msg strong { font-weight: 650; }

.ptc-root .ptc-typing { display: inline-flex; align-items: center; gap: 10px; color: var(--ptc-muted); font-size: 14px; }
.ptc-root .ptc-dots { display: inline-flex; gap: 4px; }
.ptc-root .ptc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ptc-accent); opacity: .35; animation: ptc-blink 1.2s infinite ease-in-out; }
.ptc-root .ptc-dots i:nth-child(2) { animation-delay: .15s; }
.ptc-root .ptc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ptc-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Tour cards ---------- */
.ptc-root .ptc-cards { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.ptc-root a.ptc-card {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--ptc-line);
	border-radius: 14px;
	background: #fff;
	color: var(--ptc-ink);
	transition: border-color .15s ease;
}
.ptc-root a.ptc-card:hover { border-color: var(--ptc-accent); color: var(--ptc-ink); }
.ptc-root a.ptc-card:focus-visible { outline: 2px solid var(--ptc-accent); outline-offset: 2px; }
.ptc-root .ptc-card img {
	width: 92px;
	height: 100%;
	min-height: 92px;
	max-width: none;
	object-fit: cover;
	border-radius: 10px;
	display: block;
	background: var(--ptc-sea);
}
.ptc-root .ptc-card-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ptc-root .ptc-card-title { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--ptc-ink); }
.ptc-root .ptc-card-why { font-size: 13.5px; line-height: 1.45; color: var(--ptc-ink); }
.ptc-root .ptc-card-notice {
	font-size: 12.5px;
	line-height: 1.4;
	color: #8a5a00;
	background: #FFF7E0;
	border-radius: 6px;
	padding: 5px 8px;
}
.ptc-root .ptc-card-meta { font-size: 12.5px; line-height: 1.4; color: var(--ptc-muted); }
.ptc-root .ptc-card-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
/* The one flourish: a lemon highlighter under the price. */
.ptc-root .ptc-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--ptc-ink);
	background: linear-gradient(transparent 58%, rgba(242, 194, 48, .6) 58%, rgba(242, 194, 48, .6) 92%, transparent 92%);
	padding: 0 2px;
}
.ptc-root .ptc-price-wrap { display: inline-flex; flex-direction: column; gap: 2px; }
.ptc-root .ptc-pp { font-size: 12px; color: var(--ptc-muted); }
.ptc-root .ptc-cta { font-size: 14px; font-weight: 600; color: var(--ptc-accent); white-space: nowrap; }

.ptc-root a.ptc-linkcard { grid-template-columns: 1fr; }
.ptc-root a.ptc-linkcard .ptc-card-foot { justify-content: flex-start; }

/* ---------- Contact ---------- */
.ptc-root .ptc-contact { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; max-width: 100%; }
.ptc-root .ptc-contact-note { font-size: 13.5px; line-height: 1.45; color: var(--ptc-muted); }
.ptc-root .ptc-contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ptc-root .ptc-contact a {
	display: inline-flex;
	align-items: center;
	padding: 9px 14px;
	border: 1px solid var(--ptc-accent);
	border-radius: 999px;
	color: var(--ptc-accent);
	font-size: 14px;
	font-weight: 600;
	background: #fff;
}
.ptc-root .ptc-contact a.is-primary { background: var(--ptc-accent); color: #fff; }
.ptc-root .ptc-contact a:hover { background: var(--ptc-accent); color: #fff; }
.ptc-root .ptc-contact a:focus-visible { outline: 2px solid var(--ptc-accent); outline-offset: 2px; }

/* ---------- Suggestions ---------- */
.ptc-root .ptc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.ptc-root .ptc-chips[hidden] { display: none; }
.ptc-root .ptc-chip {
	padding: 8px 13px;
	border: 1px solid var(--ptc-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ptc-ink);
	font-size: 13.5px;
	line-height: 1.2;
	cursor: pointer;
}
.ptc-root .ptc-chip:hover { border-color: var(--ptc-accent); color: var(--ptc-accent); }
.ptc-root .ptc-chip:focus-visible { outline: 2px solid var(--ptc-accent); outline-offset: 1px; }

/* ---------- Composer ---------- */
.ptc-root .ptc-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px 8px;
	border-top: 1px solid var(--ptc-line);
	margin: 0;
}
.ptc-root .ptc-input {
	flex: 1;
	min-height: 44px;
	max-height: 120px;
	margin: 0;
	padding: 11px 15px;
	border: 1px solid var(--ptc-line);
	border-radius: 22px;
	background: #fff;
	color: var(--ptc-ink);
	font: inherit;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.35;
	resize: none;
	box-shadow: none;
	overflow-y: hidden;
	scrollbar-width: thin;
}
.ptc-root .ptc-input:focus { outline: none; border-color: var(--ptc-accent); box-shadow: 0 0 0 3px rgba(29, 78, 158, .15); }
.ptc-root .ptc-send {
	flex: none;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--ptc-accent);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.ptc-root .ptc-send svg { width: 20px; height: 20px; }
.ptc-root .ptc-send:disabled { opacity: .45; cursor: default; }
.ptc-root .ptc-send:focus-visible { outline: 3px solid var(--ptc-lemon); outline-offset: 2px; }

.ptc-root .ptc-legal { padding: 0 16px 10px; font-size: 11.5px; line-height: 1.4; color: var(--ptc-muted); }
.ptc-root .ptc-legal a { color: var(--ptc-muted); text-decoration: underline; }

/* Admin-only tool trace (testing). */
.ptc-root .ptc-debug { align-self: stretch; padding: 8px 10px; border: 1px dashed var(--ptc-line); border-radius: 10px; font-size: 12px; line-height: 1.4; color: var(--ptc-muted); background: #fafbfd; }
.ptc-root .ptc-debug summary { cursor: pointer; font-weight: 600; }
.ptc-root .ptc-debug p { margin: 6px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.ptc-root .ptc-debug .ptc-debug-res { margin-top: 2px; color: var(--ptc-ink); }

.ptc-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Mobile: full-screen sheet ---------- */
@media (max-width: 600px) {
	.ptc-root .ptc-dock { right: 14px; }
	.ptc-root .ptc-launcher { padding: 12px 18px 12px 14px; }
	.ptc-root .ptc-invite { right: 14px; left: 14px; max-width: none; }

	/* With the contact dock: a full-width bar, like the previous floating contact bar. */
	.ptc-root.has-dock .ptc-dock {
		left: 0;
		right: 0;
		bottom: var(--ptc-lift);
		display: grid;
		grid-template-columns: 1fr 1fr 1.5fr;
		gap: 8px;
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid var(--ptc-line);
		box-shadow: 0 -6px 18px rgba(22, 36, 58, .10);
	}
	.ptc-root.has-dock .ptc-dock-btn {
		width: auto;
		height: 46px;
		border-radius: 12px;
		box-shadow: none;
		font-size: 14px;
		font-weight: 600;
	}
	.ptc-root.has-dock .ptc-dock-label { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
	.ptc-root.has-dock .ptc-launcher { justify-content: center; height: 46px; border-radius: 12px; padding: 0 12px; box-shadow: none; font-size: 14px; }
	.ptc-root.has-dock .ptc-invite { bottom: calc(var(--ptc-lift) + 72px); }
	html.ptc-has-dock body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
	.ptc-root .ptc-panel {
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}
	.ptc-root .ptc-legal { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	html.ptc-lock, html.ptc-lock body { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
	.ptc-root .ptc-launcher,
	.ptc-root .ptc-panel,
	.ptc-root a.ptc-card { transition: none; }
	.ptc-root .ptc-dots i { animation: none; opacity: .7; }
}

@media (prefers-reduced-motion: reduce) {
	.ptc-root .ptc-dock,
	.ptc-root .ptc-invite { transition: none; animation: none; }
}
