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

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

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

/* ---------- Launcher ---------- */
.eitc-root .eitc-launcher {
	position: fixed;
	right: 20px;
	bottom: var(--eitc-bottom);
	z-index: 99990; /* below the Iubenda banner, which must stay on top */
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px 13px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--eitc-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 24px var(--eitc-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.eitc-root .eitc-launcher:hover { transform: translateY(-1px); box-shadow: 0 10px 28px var(--eitc-shadow); }
.eitc-root .eitc-launcher:focus-visible { outline: 3px solid var(--eitc-lemon); outline-offset: 3px; }
.eitc-root .eitc-dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--eitc-lemon);
	box-shadow: 0 0 0 3px rgba(242, 194, 48, .28);
	flex: none;
}
.eitc-root.is-open .eitc-launcher { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* ---------- Panel ---------- */
.eitc-root .eitc-panel {
	position: fixed;
	right: 20px;
	bottom: var(--eitc-bottom);
	z-index: 99991;
	width: 392px;
	height: min(660px, calc(100vh - var(--eitc-bottom) - 40px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--eitc-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;
}
.eitc-root.is-open .eitc-panel {
	opacity: 1;
	transform: none;
	visibility: visible;
	transition: opacity .2s ease, transform .2s ease;
}

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

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

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

/* ---------- Tour cards ---------- */
.eitc-root .eitc-cards { display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.eitc-root a.eitc-card {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 12px;
	padding: 10px;
	border: 1px solid var(--eitc-line);
	border-radius: 14px;
	background: #fff;
	color: var(--eitc-ink);
	transition: border-color .15s ease;
}
.eitc-root a.eitc-card:hover { border-color: var(--eitc-accent); color: var(--eitc-ink); }
.eitc-root a.eitc-card:focus-visible { outline: 2px solid var(--eitc-accent); outline-offset: 2px; }
.eitc-root .eitc-card img {
	width: 92px;
	height: 100%;
	min-height: 92px;
	max-width: none;
	object-fit: cover;
	border-radius: 10px;
	display: block;
	background: var(--eitc-sea);
}
.eitc-root .eitc-card-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.eitc-root .eitc-card-title { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--eitc-ink); }
.eitc-root .eitc-card-why { font-size: 13.5px; line-height: 1.45; color: var(--eitc-ink); }
.eitc-root .eitc-card-meta { font-size: 12.5px; line-height: 1.4; color: var(--eitc-muted); }
.eitc-root .eitc-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. */
.eitc-root .eitc-price {
	font-size: 14px;
	font-weight: 700;
	color: var(--eitc-ink);
	background: linear-gradient(transparent 58%, rgba(242, 194, 48, .6) 58%, rgba(242, 194, 48, .6) 92%, transparent 92%);
	padding: 0 2px;
}
.eitc-root .eitc-cta { font-size: 14px; font-weight: 600; color: var(--eitc-accent); white-space: nowrap; }

/* ---------- Contact ---------- */
.eitc-root .eitc-contact { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.eitc-root .eitc-contact a {
	display: inline-flex;
	align-items: center;
	padding: 9px 14px;
	border: 1px solid var(--eitc-accent);
	border-radius: 999px;
	color: var(--eitc-accent);
	font-size: 14px;
	font-weight: 600;
	background: #fff;
}
.eitc-root .eitc-contact a:hover { background: var(--eitc-accent); color: #fff; }
.eitc-root .eitc-contact a:focus-visible { outline: 2px solid var(--eitc-accent); outline-offset: 2px; }

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

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

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

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

.eitc-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) {
	.eitc-root .eitc-launcher { right: 14px; padding: 12px 18px 12px 14px; }
	.eitc-root .eitc-panel {
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
	}
	.eitc-root .eitc-legal { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
	html.eitc-lock, html.eitc-lock body { overflow: hidden; }
}

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