/* Assistenza clienti - scoped to .ac- namespace to avoid theme conflicts */

.ac-contact {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	gap: 40px;
	max-width: 940px;
	margin: 16px auto 0;
	align-items: start;
	font-family: 'Inter Tight', sans-serif;
	color: #667085;
}

.ac-contact *,
.ac-contact *::before,
.ac-contact *::after {
	box-sizing: border-box;
}

/* ---------- Flow ---------- */

/* The first step is rendered by script; reserve its height so the content
   below (the side panel on mobile, the footer) does not jump (CLS). */
.ac-flow:not([data-step]) {
	min-height: 360px;
}

@media (max-width: 959px) {
	.ac-flow:not([data-step]) {
		min-height: 446px;
	}
}

@media (max-width: 399px) {
	.ac-flow:not([data-step]) {
		min-height: 486px;
	}
}

.ac-step {
	animation: ac-in .25s ease-out;
}

@keyframes ac-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ac-step { animation: none; }
}

.ac-contact .ac-title {
	margin: 0 0 8px;
	color: #2A3C43;
	font-family: 'Inter Tight', sans-serif;
	font-size: 22px;
	line-height: 30px;
	font-weight: 700;
	letter-spacing: 0;
}

.ac-contact .ac-lead {
	margin: 0 0 20px;
	font-size: 16px;
	line-height: 24px;
}

.ac-back,
.ac-link {
	padding: 0;
	border: 0;
	background: none;
	color: #2A3C43;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.ac-back {
	margin-bottom: 16px;
	color: #667085;
}

.ac-back:hover,
.ac-link:hover {
	color: #272C36;
	text-decoration: underline;
}

.ac-link {
	margin-top: 16px;
	text-align: left;
}

.ac-options {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 20px;
}

.ac-option {
	display: flex;
	gap: 16px;
	align-items: center;
	width: 100%;
	padding: 18px 20px;
	border: 1px solid #E4EBE1;
	border-radius: 12px;
	background: #fff;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}

.ac-option:hover,
.ac-option:focus-visible {
	border-color: #F8AD40;
	box-shadow: 0 6px 20px rgba(39, 44, 54, .08);
	outline: none;
}

.ac-option:active {
	transform: scale(.99);
}

.ac-icon {
	flex: 0 0 44px;
	height: 44px;
	border-radius: 10px;
	background: rgba(248, 173, 64, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #272C36;
}

.ac-icon svg {
	width: 22px;
	height: 22px;
}

.ac-option__text {
	flex: 1;
	min-width: 0;
}

.ac-option__text strong {
	display: block;
	color: #2A3C43;
	font-size: 16px;
	line-height: 22px;
}

.ac-option__text span {
	display: block;
	margin-top: 2px;
	font-size: 14px;
	line-height: 20px;
}

.ac-option__arrow {
	color: #98A2B3;
	font-size: 26px;
	line-height: 1;
	transition: color .2s, transform .2s;
}

.ac-option:hover .ac-option__arrow {
	color: #F8AD40;
	transform: translateX(3px);
}

/* ---------- Form ---------- */

.ac-contact .ac-info {
	margin: 4px 0 20px;
	list-style: disc;
	padding: 16px 20px 16px 36px;
	border-radius: 12px;
	background: rgba(248, 173, 64, .12);
	color: #344054;
	font-size: 14px;
	line-height: 21px;
}

.ac-info li + li {
	margin-top: 8px;
}

.ac-field {
	margin-bottom: 16px;
}

.ac-field label {
	display: block;
	margin-bottom: 6px;
	color: #2A3C43;
	font-size: 14px;
	font-weight: 600;
}

.ac-contact .ac-field input,
.ac-contact .ac-field textarea,
.ac-contact .ac-field select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 11px 14px;
	height: auto;
	border: 1px solid #D0D5DD;
	border-radius: 8px;
	background: #fff;
	color: #272C36;
	font: inherit;
	font-size: 16px;
	line-height: 22px;
	box-shadow: none;
	transition: border-color .2s, box-shadow .2s;
}

.ac-field textarea {
	resize: vertical;
	min-height: 96px;
}

.ac-contact .ac-field input:focus,
.ac-contact .ac-field textarea:focus,
.ac-contact .ac-field select:focus {
	border-color: #F8AD40;
	box-shadow: 0 0 0 3px rgba(248, 173, 64, .25);
	outline: none;
}

.ac-error {
	display: none;
	margin-top: 6px;
	color: #D92D20;
	font-size: 13px;
}

.ac-contact .ac-field.is-invalid input,
.ac-contact .ac-field.is-invalid textarea {
	border-color: #D92D20;
}

.ac-field.is-invalid .ac-error {
	display: block;
}

.ac-contact .ac-note,
.ac-contact .ac-hint {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 21px;
}

.ac-contact .ac-hint {
	color: #B54708;
}

.ac-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-top: 8px;
}

.ac-submit,
.ac-secondary {
	padding: 13px 22px;
	border-radius: 8px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
	cursor: pointer;
	transition: background-color .2s, border-color .2s;
}

.ac-submit {
	border: 1px solid #F8AD40;
	background: #F8AD40;
	color: #272C36;
}

.ac-submit:hover {
	border-color: #F59E0B;
	background: #F59E0B;
}

.ac-secondary {
	border: 1px solid #D0D5DD;
	background: #fff;
	color: #272C36;
}

.ac-secondary:hover {
	border-color: #272C36;
}

.ac-actions .ac-link {
	margin-top: 0;
}

/* ---------- Done ---------- */

.ac-done__badge .ac-icon {
	width: 52px;
	height: 52px;
	margin-bottom: 16px;
	border-radius: 50%;
	background: #ECFDF3;
	color: #039855;
}

.ac-done__badge svg {
	width: 26px;
	height: 26px;
}

.ac-summary {
	display: grid;
	grid-template-columns: minmax(120px, max-content) 1fr;
	gap: 8px 16px;
	margin: 0 0 20px;
	padding: 16px 20px;
	border: 1px solid #E4EBE1;
	border-radius: 12px;
	font-size: 14px;
	line-height: 20px;
}

.ac-contact .ac-summary dt,
.ac-contact .ac-summary dd {
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

.ac-summary dt {
	color: #667085;
}

.ac-summary dd {
	color: #272C36;
	font-weight: 600;
	overflow-wrap: anywhere;
	white-space: pre-line;
}

.ac-copy-buffer {
	position: fixed;
	top: -1000px;
	opacity: 0;
}

/* ---------- Response time ---------- */

.ac-contact .ac-badge {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin: 0 0 20px;
	padding: 8px 14px;
	border-radius: 999px;
	background: #ECFDF3;
	color: #05603A;
	font-size: 15px;
	line-height: 20px;
}

.ac-badge strong {
	color: #05603A;
	font-weight: 700;
}

.ac-badge svg {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
}

.ac-badge .ac-icon {
	flex: 0 0 18px;
	height: 18px;
	background: none;
	color: inherit;
}

.ac-contact .ac-badge--inline {
	display: none;
	margin: 4px 0 0;
}

.ac-eta {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	margin: 0 0 20px;
	padding: 16px 20px;
	border-radius: 12px;
	background: #ECFDF3;
	color: #05603A;
}

.ac-eta .ac-icon {
	flex-basis: 40px;
	height: 40px;
	background: #D1FADF;
	color: #05603A;
}

.ac-contact .ac-eta p {
	margin: 0;
	font-size: 14px;
	line-height: 21px;
}

.ac-eta strong {
	display: block;
	margin-bottom: 2px;
	color: #05603A;
	font-size: 16px;
}

.ac-eta span {
	overflow-wrap: anywhere;
}

.ac-help {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	line-height: 18px;
}

/* ---------- Side: how it works / chat ---------- */

.ac-side {
	position: sticky;
	top: 180px;
}

.ac-promise {
	padding: 28px;
	border: 1px solid #E4EBE1;
	border-radius: 16px;
	background: #F9FAFB;
}

.ac-promise[hidden],
.ac-chat[hidden] {
	display: none;
}

.ac-contact .ac-promise__title {
	margin: 0 0 16px;
	color: #2A3C43;
	font-family: 'Inter Tight', sans-serif;
	font-size: 18px;
	line-height: 24px;
	font-weight: 700;
	letter-spacing: 0;
}

.ac-contact .ac-howto {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ac-howto;
}

.ac-howto li {
	position: relative;
	margin: 0;
	padding: 0 0 18px 44px;
	counter-increment: ac-howto;
	font-size: 14px;
	line-height: 20px;
}

.ac-howto li:last-child {
	padding-bottom: 0;
}

.ac-howto li::before {
	content: counter(ac-howto);
	position: absolute;
	top: 0;
	left: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #F8AD40;
	color: #272C36;
	font-size: 14px;
	font-weight: 700;
	line-height: 28px;
	text-align: center;
}

.ac-howto li:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 32px;
	bottom: 4px;
	left: 13.5px;
	width: 1px;
	background: #E4EBE1;
}

.ac-howto strong {
	display: block;
	margin-bottom: 2px;
	color: #2A3C43;
	font-size: 15px;
}

.ac-howto span {
	display: block;
}

/* ---------- Chat ---------- */

.ac-chat {
	height: 600px;
	border: 1px solid #E4EBE1;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 16px 40px rgba(39, 44, 54, .12);
	background: #fff;
}

.ac-chat__inner {
	width: 100%;
	height: 100%;
}

@media (max-width: 959px) {
	.ac-contact {
		grid-template-columns: 1fr;
		gap: 32px;
		max-width: 560px;
	}

	.ac-side {
		position: static;
	}

	.ac-contact .ac-badge--inline {
		display: inline-flex;
	}

	.ac-promise .ac-badge {
		display: none;
	}

	.ac-chat {
		height: min(600px, 80vh);
		min-height: 480px;
		scroll-margin-top: 90px;
	}
}

@media (max-width: 480px) {
	.ac-summary {
		grid-template-columns: 1fr;
		gap: 2px;
	}

	.ac-summary dd + dt {
		margin-top: 8px;
	}

	.ac-submit,
	.ac-secondary {
		width: 100%;
	}
}
