/* Scope WP: solo fix embed. Layout e dimensioni da landing.html / style.css. */

.webly-agentpress-scope {
	font-family: "Outfit", system-ui, sans-serif;
	font-size: 16px;
	--webly-agentpress-z: 2147483000;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) {
	position: static;
	width: 0;
	height: 0;
	overflow: visible;
	margin: 0;
	padding: 0;
	border: 0;
}

.webly-agentpress-scope *,
.webly-agentpress-scope *::before,
.webly-agentpress-scope *::after {
	box-sizing: border-box;
}

/* Widget flottante: ancorato al viewport (portato su body via JS). */
/* Posizione bollino e pannello */
.webly-agentpress-scope.webly-agentpress--bottom-left:not(.webly-agentpress-inline) .landing-chatbot-box {
	right: auto !important;
	left: 1.5rem !important;
}

.webly-agentpress-scope.webly-agentpress--bottom-left:not(.webly-agentpress-inline) .landing-chatbot-panel-group {
	right: auto !important;
	left: 0 !important;
}

.webly-agentpress-scope.webly-agentpress--top-right:not(.webly-agentpress-inline) .landing-chatbot-box {
	bottom: auto !important;
	top: 1.5rem !important;
}

.webly-agentpress-scope.webly-agentpress--top-right:not(.webly-agentpress-inline) .landing-chatbot-panel-group {
	bottom: auto !important;
	top: calc(100% + 0.75rem) !important;
}

.webly-agentpress-scope.webly-agentpress--top-left:not(.webly-agentpress-inline) .landing-chatbot-box {
	right: auto !important;
	left: 1.5rem !important;
	bottom: auto !important;
	top: 1.5rem !important;
}

.webly-agentpress-scope.webly-agentpress--top-left:not(.webly-agentpress-inline) .landing-chatbot-panel-group {
	right: auto !important;
	left: 0 !important;
	bottom: auto !important;
	top: calc(100% + 0.75rem) !important;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-box {
	position: fixed !important;
	right: 1.5rem !important;
	bottom: 1.5rem !important;
	left: auto !important;
	top: auto !important;
	z-index: var(--webly-agentpress-z) !important;
	width: auto;
	height: auto;
	margin: 0;
	pointer-events: none;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-box > * {
	pointer-events: auto;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-btn {
	position: relative;
	z-index: calc(var(--webly-agentpress-z) + 2);
	display: flex !important;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-panel-group {
	position: absolute !important;
	right: 0 !important;
	bottom: calc(100% + 0.75rem) !important;
	left: auto !important;
	top: auto !important;
	z-index: calc(var(--webly-agentpress-z) + 1) !important;
	opacity: 0;
	transform: translateY(1rem);
	transition: opacity 0.35s ease, transform 0.35s ease;
	box-shadow: var(--primary-box-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.12));
	border-radius: var(--bs-border-radius, 0.375rem);
	overflow: hidden;
	pointer-events: none;
}

.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-panel-group.show-box {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Pannello aperto su mobile/tablet: centrato, bollino resta in angolo */
@media screen and (max-width: 991px) {
	.webly-agentpress-scope:not(.webly-agentpress-inline) .landing-chatbot-panel-group.show-box {
		position: fixed !important;
		left: 50% !important;
		right: auto !important;
		bottom: calc(1.5rem + 3.125rem + 0.75rem) !important;
		transform: translateX(-50%) !important;
	}
}

.webly-agentpress--bottom-left:not(.webly-agentpress-inline) .landing-chatbot-box {
	right: auto !important;
	left: 1.5rem !important;
}

.webly-agentpress--bottom-left:not(.webly-agentpress-inline) .landing-chatbot-panel-group {
	right: auto !important;
	left: 0 !important;
}

.webly-agentpress-scope .landing-chatbot-panel-group .landing-chatbot-content-box {
	position: relative !important;
	right: auto !important;
	bottom: auto !important;
	width: 352px !important;
	height: 512px !important;
	min-width: 352px !important;
	min-height: 512px !important;
	max-height: min(512px, calc(100vh - 10rem)) !important;
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
	overflow: hidden;
	border-radius: var(--bs-border-radius, 0.375rem) var(--bs-border-radius, 0.375rem) 0 0;
	box-shadow: none;
}

.webly-agentpress-scope .landing-chatbot-panel-group.webly-agentpress-view-home .landing-chatbot-content-box {
	height: 560px !important;
	min-height: 560px !important;
	max-height: min(560px, calc(100vh - 10rem)) !important;
}

.webly-agentpress-scope .landing-chatbot-panel-group.webly-agentpress-view-inbox .landing-chatbot-content-box {
	height: 560px !important;
	min-height: 560px !important;
	max-height: min(560px, calc(100vh - 10rem)) !important;
}

.webly-agentpress-scope .landing-chatbot-panel-group.webly-agentpress-view-thread .landing-chatbot-content-box {
	height: 512px !important;
	min-height: 512px !important;
	max-height: min(512px, calc(100vh - 10rem)) !important;
}

.webly-agentpress-scope .landing-chatbot-panel-group.webly-agentpress-view-onboarding .landing-chatbot-content-box {
	height: 560px !important;
	min-height: 560px !important;
	max-height: min(560px, calc(100vh - 10rem)) !important;
}

.webly-agentpress-scope .webly-agentpress-onboarding .form-label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: #374151;
}

.webly-agentpress-scope .webly-agentpress-onboarding .form-control {
	font-size: 0.875rem;
}

@media screen and (max-width: 991px) {
	.webly-agentpress-scope .landing-chatbot-panel-group .landing-chatbot-content-box {
		width: min(352px, calc(100vw - 2rem)) !important;
		min-width: 0 !important;
	}
}

.webly-agentpress--bottom-left .landing-chatbot-box {
	right: auto;
	left: 1.5rem;
}

.webly-agentpress--bottom-left .landing-chatbot-panel-group {
	right: auto;
	left: 0;
}

/* Header fixed al viewport nel CSS tema: dentro il pannello */
.webly-agentpress-scope .landing-chatbot-content-box .landing-chatbot-header {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	width: 100% !important;
	z-index: 3;
	display: flex !important;
	align-items: center;
	gap: 0.5rem;
	padding-right: 0.75rem !important;
}

.webly-agentpress-scope .landing-chatbot-close-btn {
	position: relative !important;
	top: auto !important;
	right: auto !important;
	flex-shrink: 0;
	margin-left: auto;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px;
	min-height: 28px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22) !important;
	color: #fff !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	z-index: 5;
}

.webly-agentpress-scope .landing-chatbot-close-btn:hover {
	background: rgba(255, 255, 255, 0.35) !important;
}

.webly-agentpress-scope .landing-chatbot-close-btn .ti {
	font-size: 14px;
	color: #fff;
}

.webly-agentpress-scope .landing-chatbot-panel-group {
	overflow: visible !important;
}

.webly-agentpress-scope .landing-chatbot-panel-group .landing-chatbot-content-box {
	overflow: hidden;
}

.webly-agentpress-scope .webly-agentpress-header-brand {
	background-color: #fff !important;
}

.webly-agentpress-scope .webly-agentpress-header-avatar.webly-agentpress-header-logo {
	object-fit: contain;
	padding: 4px;
}

/* landing.html: content-list height calc(100% - 98px), margin-top 56px */
.webly-agentpress-scope .landing-chatbot-content-box .content-list,
.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-home,
.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-inbox,
.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-thread,
.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-onboarding {
	position: relative;
	height: calc(100% - 98px) !important;
	margin-top: 56px;
	padding: 1.3rem 1.7rem;
	overflow: auto;
	padding-bottom: 19px;
}

.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-home {
	overflow-x: hidden;
	overflow-y: auto;
	padding-bottom: 0.5rem;
}

.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-onboarding {
	overflow-x: hidden;
	overflow-y: auto;
	padding-bottom: 0.75rem;
	text-align: left;
}

.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-home .chatbot-new-chat {
	padding-top: 2.5rem;
}

.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-home .suggestion-container {
	overflow: hidden;
}

.webly-agentpress-scope .landing-chatbot-content-box .webly-agentpress-pane-inbox {
	overflow-x: hidden;
	overflow-y: auto;
	padding-bottom: 0.5rem;
}

.webly-agentpress-scope .home-tab-chat-content .webly-agentpress-history-toolbar {
	padding: 0.25rem 0.5rem 0.5rem;
}

.webly-agentpress-scope .home-tab-chat-content .chat-data-list {
	max-height: none;
	padding: 5px 0.15rem;
	margin:0px;
}

.webly-agentpress-scope .home-tab-chat-content .chat-data {
	cursor: pointer;
}

.webly-agentpress-scope .webly-agentpress-history-empty {
	padding: 1.5rem 0.75rem;
	font-size: 13px;
}

/* landing.html: footer bottom 1rem, width calc(100% - 36px) */
.webly-agentpress-scope .landing-chatbot-content-box .landing-chatbot-footer {
	position: absolute !important;
	left: 1rem !important;
	bottom: 1rem !important;
	width: calc(100% - 36px) !important;
	z-index: 4;
}

/* Input + freccia invio (landing.html) */
.webly-agentpress-scope .landing-chatbot-footer .input-group {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	overflow: visible !important;
	flex-wrap: nowrap !important;
}

.webly-agentpress-scope .landing-chatbot-footer .form-control {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	padding: 0.5rem 2.75rem 0.5rem 0.75rem !important;
	font-size: 14px !important;
	line-height: 1.5 !important;
	border: 2px solid rgba(var(--secondary), 0.4) !important;
	border-radius: var(--app-border-radius, 0.375rem) !important;
	background-color: rgba(var(--white), 1) !important;
	box-shadow: none !important;
	min-height: unset !important;
	height: auto !important;
}

.webly-agentpress-scope .landing-chatbot-footer .form-control:focus {
	border-color: rgba(var(--primary), 0.8) !important;
	box-shadow: 0 0 0 0.25rem rgba(var(--primary), 0.3) !important;
	padding-left: 0.75rem !important;
}

.webly-agentpress-scope .landing-chatbot-footer .webly-agentpress-send-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	position: absolute !important;
	right: 4px !important;
	top: 50% !important;
	width: 35px !important;
	height: 35px !important;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 5;
	text-decoration: none !important;
	color: rgba(var(--secondary), 1) !important;
	background: transparent !important;
	border: 0 !important;
	cursor: pointer;
}

.webly-agentpress-scope .landing-chatbot-footer .webly-agentpress-send-btn:hover {
	color: rgba(var(--primary), 1) !important;
}

.webly-agentpress-scope .landing-chatbot-footer .ti-send {
	display: inline-block !important;
	font-family: "tabler-icons" !important;
	font-style: normal;
	font-weight: 400;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	font-size: 16px !important;
	speak: none;
	-webkit-font-smoothing: antialiased;
}

/* Nav + branding sotto la card, non dentro i 512px della chat */
.webly-agentpress-scope .webly-agentpress-chrome {
	width: 352px;
	max-width: calc(100vw - 2rem);
	background: rgba(var(--white), 1);
	border-radius: 0;
	box-shadow: none;
	padding: 0.35rem 0.75rem 0.5rem;
}

.webly-agentpress-scope .webly-agentpress-nav {
	display: flex;
	justify-content: center;
	gap: 2.5rem;
	padding: 0.25rem 0;
	border-top: 1px solid rgba(var(--secondary), 0.15);
	height: 57px;
}

.webly-agentpress-scope .webly-agentpress-nav-btn {
	border: 0;
	background: transparent;
	padding: 0.25rem 0.75rem;
	color: rgba(var(--secondary), 1);
	font-size: 2.35rem;
	line-height: 1;
	cursor: pointer;
}

.webly-agentpress-scope .webly-agentpress-nav-btn.active {
	color: rgba(var(--primary), 1);
}

.webly-agentpress-scope .webly-agentpress-powered {
	font-size: 11px;
	color: #6b7280;
	padding-top: 0.25rem;
	text-align: center;
}

.webly-agentpress-inline .landing-chatbot-btn {
	display: none;
}

.webly-agentpress-inline .landing-chatbot-panel-group {
	opacity: 1 !important;
	transform: none !important;
	position: relative;
	right: auto;
	bottom: auto;
	margin: 0 auto;
}

.webly-agentpress-scope .team-text-box,
.webly-agentpress-scope .team-text-box p,
.webly-agentpress-scope .team-text-box .wsp-answer-content,
.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-p {
	word-break: normal !important;
	overflow-wrap: break-word !important;
	hyphens: none !important;
}

.webly-agentpress-scope .team-text-box .wsp-message-assistant {
	background: transparent;
	padding: 0;
}

.webly-agentpress-scope .team-text-box .wsp-react-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.35rem;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content {
	font-size: 14px;
	line-height: 1.45;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-ul {
	margin: 4px 0 8px 18px;
	padding: 0;
	list-style: disc;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-hr {
	border: 0;
	border-top: 1px solid #e5e7eb;
	margin: 10px 0;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-table-wrap {
	overflow-x: auto;
	margin: 8px 0 12px;
	max-width: 100%;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-table {
	width: 100%;
	min-width: 280px;
	border-collapse: collapse;
	font-size: 12px;
	line-height: 1.4;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-table th,
.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-table td {
	border: 1px solid #e5e7eb;
	padding: 6px 8px;
	text-align: left;
	vertical-align: top;
	word-break: normal;
}

.webly-agentpress-scope .team-text-box .wsp-answer-content .wsp-table th {
	background: #f9fafb;
	font-weight: 600;
}

.webly-agent-chat-notice {
	padding: 12px;
	border-radius: 8px;
	background: #fef3c7;
	color: #92400e;
	font-size: 14px;
}
