/* LC13 Assistente Richieste – stile chat. Il colore arriva da --lc13r-c. */
.lc13r {
	--lc13r-c: #2f6f5e;
	--lc13r-ink: #1d2327;
	--lc13r-mute: #5f6670;
	--lc13r-line: #e2e5e9;
	--lc13r-soft: #f5f6f8;
	font-size: 15px;
	line-height: 1.45;
	color: var(--lc13r-ink);
	text-align: left;
}
.lc13r *, .lc13r *::before, .lc13r *::after { box-sizing: border-box; }

/* Neutralizza gli stili dei temi sui pulsanti e campi */
.lc13r button, .lc13r input, .lc13r textarea, .lc13r select {
	font-family: inherit; text-transform: none; letter-spacing: normal;
	box-shadow: none; margin: 0; min-height: 0; line-height: 1.3;
}
.lc13r button:focus-visible, .lc13r input:focus-visible, .lc13r textarea:focus-visible, .lc13r select:focus-visible, .lc13r a:focus-visible {
	outline: 2px solid var(--lc13r-c); outline-offset: 2px;
}

/* Pulsante flottante */
.lc13r--float { position: fixed; bottom: 20px; z-index: 99999; }
.lc13r--destra { right: 20px; }
.lc13r--sinistra { left: 20px; }
.lc13r-launch {
	display: flex; align-items: center; gap: 8px;
	border: 0; border-radius: 999px; padding: 12px 18px;
	background: var(--lc13r-c); color: #fff;
	font-size: 15px; font-weight: 600; cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	transition: transform .15s ease;
}
.lc13r-launch:hover { transform: translateY(-1px); }
.lc13r-launch svg { width: 20px; height: 20px; flex: none; }

/* Pannello */
.lc13r-panel {
	display: flex; flex-direction: column;
	background: #fff; border-radius: 16px; overflow: hidden;
}
.lc13r-panel[hidden] { display: none; }
.lc13r--float .lc13r-panel {
	position: absolute; bottom: 64px;
	width: 370px; max-width: calc(100vw - 40px);
	height: 540px; max-height: calc(100vh - 110px);
	box-shadow: 0 14px 44px rgba(0, 0, 0, .22);
}
.lc13r--destra .lc13r-panel { right: 0; }
.lc13r--sinistra .lc13r-panel { left: 0; }
.lc13r--inline .lc13r-panel {
	height: 560px; max-width: 560px;
	border: 1px solid var(--lc13r-line);
	box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}

.lc13r-head {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	padding: 14px 16px; background: var(--lc13r-c); color: #fff;
}
.lc13r-title strong { display: block; font-size: 16px; }
.lc13r-title span { display: block; font-size: 12.5px; opacity: .85; }
.lc13r-close {
	background: transparent; border: 0; color: #fff; padding: 0 4px;
	font-size: 28px; line-height: 1; cursor: pointer;
}

/* Chat */
.lc13r-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.lc13r-chat[hidden] { display: none; }
.lc13r-msgs {
	flex: 1; overflow-y: auto; padding: 16px;
	display: flex; flex-direction: column; gap: 8px;
	background: var(--lc13r-soft);
}
.lc13r-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; overflow-wrap: anywhere; }
.lc13r-msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--lc13r-line); border-bottom-left-radius: 4px; }
.lc13r-msg--user { align-self: flex-end; background: var(--lc13r-c); color: #fff; border-bottom-right-radius: 4px; }
.lc13r-msg a { color: inherit; text-decoration: underline; }
.lc13r-typing i {
	display: inline-block; width: 6px; height: 6px; margin: 0 2px;
	border-radius: 50%; background: var(--lc13r-mute);
	animation: lc13r-blink 1s infinite;
}
.lc13r-typing i:nth-child(2) { animation-delay: .15s; }
.lc13r-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lc13r-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Pacchetti in chat */
.lc13r-pkgs { display: flex; flex-direction: column; gap: 8px; }
.lc13r-pkg { background: #fff; border: 1px solid var(--lc13r-line); border-radius: 12px; padding: 12px 14px; }
.lc13r-pkg-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lc13r-pkg-top strong { font-size: 15.5px; }
.lc13r-pkg-price { color: var(--lc13r-c); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lc13r-pkg-sub { font-size: 12.5px; color: var(--lc13r-mute); margin-top: 1px; }
.lc13r-pkg-desc { margin: 6px 0 0; font-size: 14px; }
.lc13r-pkg ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.lc13r-pkg li { margin: 1px 0; }
.lc13r-pkg-btn {
	margin-top: 10px; border: 1px solid var(--lc13r-c); background: #fff; color: var(--lc13r-c);
	border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.lc13r-pkg-btn:hover { background: var(--lc13r-c); color: #fff; }

.lc13r-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 12px; background: var(--lc13r-soft); }
.lc13r-chips:empty { display: none; }
.lc13r-chip {
	border: 1px solid var(--lc13r-c); background: #fff; color: var(--lc13r-c);
	border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; text-align: left;
}
.lc13r-chip:hover { background: var(--lc13r-c); color: #fff; }
.lc13r-chip--cta { background: var(--lc13r-c); color: #fff; font-weight: 600; }
.lc13r-chip--cta:hover { filter: brightness(1.08); }

.lc13r-ask { display: flex; gap: 8px; padding: 12px; background: #fff; border-top: 1px solid var(--lc13r-line); }
.lc13r-ask input {
	flex: 1; min-width: 0; border: 1px solid var(--lc13r-line); border-radius: 999px;
	padding: 9px 14px; font-size: 15px; background: #fff; color: var(--lc13r-ink);
}
.lc13r-send {
	width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%;
	background: var(--lc13r-c); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center; padding: 0;
}
.lc13r-send svg { width: 18px; height: 18px; }

/* Modulo */
.lc13r-formwrap { flex: 1; overflow-y: auto; padding: 14px 16px 18px; }
.lc13r-formwrap[hidden] { display: none; }
.lc13r-back { background: none; border: 0; padding: 0; color: var(--lc13r-c); font-size: 13.5px; cursor: pointer; margin-bottom: 8px; }
.lc13r-form-intro { margin: 0 0 12px; color: var(--lc13r-mute); font-size: 14px; }
.lc13r-field { display: block; margin: 0 0 10px; }
.lc13r-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.lc13r-field input, .lc13r-field textarea, .lc13r-field select {
	display: block; width: 100%; border: 1px solid #c8ccd2; border-radius: 8px;
	padding: 9px 11px; font-size: 15px; background: #fff; color: var(--lc13r-ink);
}
.lc13r-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lc13r-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 4px 0 12px; cursor: pointer; }
.lc13r-check input { margin-top: 2px; flex: none; width: 16px; height: 16px; }
.lc13r-check a { color: var(--lc13r-c); }
.lc13r-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lc13r-error { color: #b32d2e; font-size: 13.5px; margin: 0 0 10px; }
.lc13r-error[hidden] { display: none; }
.lc13r-submit {
	display: block; width: 100%; border: 0; border-radius: 10px; padding: 12px;
	background: var(--lc13r-c); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.lc13r-submit:disabled { opacity: .6; cursor: wait; }

/* Apertura al centro: finestra grande con sfondo oscurato */
html.lc13r-noscroll { overflow: hidden; }
.lc13r-launch[hidden] { display: none; }
.lc13r-backdrop {
	position: fixed; inset: 0; z-index: 1;
	background: rgba(15, 20, 25, .55);
	animation: lc13r-fade .18s ease-out;
}
.lc13r-backdrop[hidden] { display: none; }
.lc13r--centro .lc13r-panel {
	position: fixed; z-index: 2;
	left: 50%; top: 50%; right: auto; bottom: auto;
	transform: translate(-50%, -50%);
	width: 780px; max-width: calc(100vw - 48px);
	height: 660px; max-height: calc(100vh - 64px);
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
	animation: lc13r-pop .2s ease-out;
	font-size: 16px;
}
.lc13r--centro .lc13r-head { padding: 18px 24px; }
.lc13r--centro .lc13r-title strong { font-size: 19px; }
.lc13r--centro .lc13r-title span { font-size: 13.5px; }
.lc13r--centro .lc13r-msgs { padding: 22px 28px; gap: 10px; }
.lc13r--centro .lc13r-msg { max-width: 72%; }
.lc13r--centro .lc13r-chips { padding: 4px 26px 16px; gap: 8px; }
.lc13r--centro .lc13r-chip { font-size: 14.5px; padding: 8px 14px; }
.lc13r--centro .lc13r-ask { padding: 14px 24px; }
.lc13r--centro .lc13r-pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.lc13r--centro .lc13r-pkg { display: flex; flex-direction: column; }
.lc13r--centro .lc13r-pkg-btn { margin-top: auto; align-self: flex-start; }
.lc13r--centro .lc13r-pkg ul { margin-bottom: 10px; }
.lc13r--centro .lc13r-formwrap { padding: 22px 28px 26px; }
.lc13r--centro .lc13r-form { max-width: 600px; margin: 0 auto; }
.lc13r--centro .lc13r-back { max-width: 600px; margin: 0 auto 10px; display: block; }
@keyframes lc13r-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lc13r-pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.98); } to { opacity: 1; transform: translate(-50%, -50%); } }

@media (max-width: 480px) {
	.lc13r--centro .lc13r-panel {
		transform: none; animation: none; font-size: 15px;
		top: 10px; left: 8px; right: 8px; bottom: 76px;
		width: auto; max-width: none; height: auto; max-height: none;
		border-radius: 16px;
	}
	.lc13r--centro .lc13r-pkgs { grid-template-columns: 1fr; }
	.lc13r--centro .lc13r-msg { max-width: 86%; }
	.lc13r--centro .lc13r-msgs, .lc13r--centro .lc13r-formwrap { padding: 16px; }
}

@media (max-width: 480px) {
	.lc13r--float { bottom: 14px; }
	.lc13r--destra { right: 14px; }
	.lc13r--sinistra { left: 14px; }
	.lc13r--float .lc13r-panel {
		position: fixed; top: 10px; left: 8px; right: 8px; bottom: 76px;
		width: auto; max-width: none; height: auto; max-height: none;
	}
	.lc13r-row { grid-template-columns: 1fr; }
	.lc13r input, .lc13r textarea, .lc13r select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.lc13r-typing i { animation: none; opacity: .6; }
	.lc13r-launch { transition: none; }
	.lc13r-backdrop, .lc13r--centro .lc13r-panel { animation: none; }
}

/* 0.6 – Servizi aggiuntivi */
.lc13r-extra { border: 1px solid var(--lc13r-line); border-radius: 10px; padding: 8px 12px 2px; margin: 0 0 12px; }
.lc13r-extra legend { font-size: 13px; font-weight: 600; padding: 0 4px; }
.lc13r-extra .lc13r-check { margin: 6px 0 8px; }
.lc13r-extra-price { font-style: normal; color: var(--lc13r-mute); white-space: nowrap; }
.lc13r-pkg--extra ul.lc13r-extra-list { list-style: none; padding-left: 0; }
.lc13r-pkg--extra li { margin: 6px 0; }
.lc13r-pkg--extra .lc13r-pkg-price { font-weight: 600; }

/* Avviso data occupata (0.7) */
.lc13r-note {
	margin: -4px 0 10px; padding: 8px 10px; border-radius: 6px; font-size: 13px; line-height: 1.4;
	background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa;
}
.lc13r-note[hidden] { display: none; }
