/**
 * imotigreece Chatbot — frontend widget styles.
 * Colors come from CSS custom properties configured in the admin.
 */
.igchat {
	--igchat-primary: #1b3a4b;
	--igchat-accent: #b4623c;
	--igchat-surface: #f6f4f0;
	--igchat-ink: #1d252b;
	--igchat-muted: #4a5560;
	--igchat-line: rgba(27, 58, 75, 0.18);
	--igchat-radius: 14px;
	--igchat-shadow: 0 18px 45px rgba(16, 32, 42, 0.24);
	position: fixed;
	inset-inline-end: 16px;
	inset-block-end: 16px;
	z-index: 2147483000;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--igchat-ink);
}
.igchat--left {
	inset-inline-start: 16px;
	inset-inline-end: auto;
}
.igchat [hidden] {
	display: none !important;
}
/* Launcher */
.igchat__launcher {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 56px;
	padding: 0 10px;
	border: 0;
	border-radius: 999px;
	background: var(--igchat-primary);
	color: #fff;
	box-shadow: var(--igchat-shadow);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.igchat__launcher:hover {
	transform: translateY(-2px);
}
.igchat__launcher-icon {
	width: 28px;
	height: 28px;
	flex: none;
	margin-inline-start: 4px;
}
.igchat__launcher-avatar {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	object-fit: cover;
	flex: none;
}
.igchat__launcher-label {
	padding-inline-end: 12px;
	display: none;
}
.igchat__launcher:focus-visible,
.igchat__icon-btn:focus-visible,
.igchat__send:focus-visible,
.igchat__chip:focus-visible,
.igchat__text-btn:focus-visible,
.igchat__feedback-btn:focus-visible,
.igchat__submit:focus-visible,
.igchat input:focus-visible,
.igchat textarea:focus-visible,
.igchat select:focus-visible {
	outline: 3px solid var(--igchat-accent);
	outline-offset: 2px;
}
/* Panel */
.igchat__panel {
	position: fixed;
	inset: 0;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	background: var(--igchat-surface);
	box-shadow: var(--igchat-shadow);
	overflow: hidden;
	animation: igchat-in 0.18s ease-out;
}
@keyframes igchat-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.igchat__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	background: var(--igchat-primary);
	color: #fff;
	flex: none;
}
.igchat__avatar {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	object-fit: cover;
	border: 2px solid rgba(255, 255, 255, 0.35);
	flex: none;
}
.igchat__heading {
	flex: 1 1 auto;
	min-width: 0;
}
/* Higher specificity than the site's body h2/p rules. */
.igchat p.igchat__role {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.3;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	color: rgba(255, 255, 255, 0.82);
}
.igchat h2.igchat__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 17px;
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: #fff;
}
.igchat__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.igchat__icon-btn:hover {
	background: rgba(255, 255, 255, 0.14);
}
.igchat__icon-btn svg {
	width: 22px;
	height: 22px;
}
/* Messages */
.igchat__messages {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}
.igchat__msg {
	display: flex;
	flex-direction: column;
	max-width: 92%;
}
.igchat__msg--user {
	align-self: flex-end;
	align-items: flex-end;
}
.igchat__msg--assistant {
	align-self: flex-start;
	align-items: flex-start;
}
.igchat__msg-row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	max-width: 100%;
	min-width: 0;
}
.igchat__msg-avatar {
	width: 32px;
	height: 32px;
	border-radius: 999px;
	object-fit: cover;
	flex: none;
}
.igchat__bubble {
	background: #fff;
	border: 1px solid var(--igchat-line);
	border-radius: var(--igchat-radius);
	padding: 10px 12px;
	box-shadow: 0 1px 2px rgba(16, 32, 42, 0.06);
}
.igchat__msg--user .igchat__bubble {
	background: var(--igchat-primary);
	border-color: var(--igchat-primary);
	color: #fff;
}
.igchat__msg--typing .igchat__bubble {
	opacity: 0.75;
	animation: igchat-pulse 1.2s ease-in-out infinite;
}
@keyframes igchat-pulse {
	50% {
		opacity: 0.45;
	}
}
.igchat__msg--error .igchat__bubble {
	border-color: #b32d2e;
}
.igchat__text {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}
/* Sources */
.igchat__sources {
	margin-top: 6px;
	font-size: 12px;
	max-width: 100%;
}
.igchat__sources-title {
	margin: 0 0 2px;
	font-weight: 600;
	color: var(--igchat-muted);
}
.igchat__sources ul {
	margin: 0;
	padding-inline-start: 18px;
}
.igchat__sources li {
	margin: 2px 0;
}
.igchat__sources a {
	color: var(--igchat-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}
/* Feedback */
.igchat__feedback {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
}
.igchat__feedback-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	color: var(--igchat-muted);
	cursor: pointer;
}
.igchat__feedback-btn:hover {
	background: rgba(27, 58, 75, 0.08);
	color: var(--igchat-primary);
}
.igchat__feedback-btn[aria-pressed="true"] {
	background: var(--igchat-primary);
	color: #fff;
}
.igchat__feedback-btn svg {
	width: 16px;
	height: 16px;
}
.igchat__feedback-status {
	font-size: 12px;
	color: var(--igchat-muted);
}
/* Chips */
.igchat__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 14px 10px;
	flex: none;
}
.igchat__chip {
	min-height: 36px;
	padding: 6px 12px;
	border: 1px solid var(--igchat-line);
	border-radius: 999px;
	background: #fff;
	color: var(--igchat-primary);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}
.igchat__chip:hover {
	border-color: var(--igchat-accent);
	background: rgba(180, 98, 60, 0.08);
}
/* Form */
.igchat__form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 14px;
	border-top: 1px solid var(--igchat-line);
	background: var(--igchat-surface);
	flex: none;
}
.igchat__input {
	flex: 1 1 auto;
	min-height: 44px;
	max-height: 120px;
	padding: 10px 12px;
	border: 1px solid var(--igchat-line);
	border-radius: 12px;
	background: #fff;
	color: var(--igchat-ink);
	font: inherit;
	resize: none;
}
.igchat__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 44px;
	border: 0;
	border-radius: 999px;
	background: var(--igchat-primary);
	color: #fff;
	cursor: pointer;
}
.igchat__send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.igchat__send svg {
	width: 20px;
	height: 20px;
}
/* Footer */
.igchat__footer {
	padding: 0 14px 10px;
	flex: none;
}
.igchat__consent {
	display: flex;
	align-items: flex-start;
	gap: 7px;
	margin: 0 0 6px;
	font-size: 11.5px;
	line-height: 1.4;
	color: var(--igchat-muted);
	cursor: pointer;
}
.igchat__consent input[type="checkbox"] {
	flex: none;
	width: 15px;
	height: 15px;
	margin: 1px 0 0;
	accent-color: var(--igchat-primary);
	cursor: pointer;
}
.igchat__consent-link {
	color: var(--igchat-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.igchat__footer-actions {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.igchat__text-btn {
	min-height: 32px;
	padding: 4px 0;
	border: 0;
	background: transparent;
	color: var(--igchat-primary);
	font: inherit;
	font-size: 12.5px;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.igchat__text-btn--muted {
	color: var(--igchat-muted);
}
/* Lead modal */
.igchat__modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: grid;
	place-items: center;
	padding: 16px;
	background: rgba(12, 22, 29, 0.55);
}
.igchat__modal-card {
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: var(--igchat-shadow);
}
.igchat__modal-card .igchat__header {
	border-radius: 14px 14px 0 0;
}
.igchat__lead-form {
	padding: 14px 16px 16px;
}
.igchat__lead-form p {
	margin: 0 0 10px;
}
.igchat__lead-form label {
	display: block;
	margin-bottom: 4px;
	font-size: 13px;
	font-weight: 600;
	color: var(--igchat-ink);
}
.igchat__lead-form input,
.igchat__lead-form select {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid var(--igchat-line);
	border-radius: 8px;
	font: inherit;
	color: var(--igchat-ink);
	background: #fff;
}
.igchat__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
.igchat__checkbox input {
	width: 18px;
	min-width: 18px;
	height: 18px;
	margin-top: 2px;
}
.igchat__checkbox label {
	margin: 0;
	font-weight: 400;
}
.igchat__hint {
	color: var(--igchat-muted);
	font-weight: 400;
}
.igchat__status {
	min-height: 1.4em;
	font-size: 13px;
	color: var(--igchat-muted);
}
.igchat__modal-actions {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 12px;
}
.igchat__submit {
	min-height: 40px;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--igchat-primary);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
/* Screen-reader utility (in case the theme lacks it). */
.igchat .screen-reader-text,
.igchat__modal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
/* Desktop panel */
@media (min-width: 480px) {
	.igchat__panel {
		inset: auto;
		inset-inline-end: 16px;
		inset-block-end: 84px;
		width: min(390px, calc(100vw - 32px));
		height: min(620px, calc(100vh - 110px));
		height: min(620px, calc(100dvh - 110px));
		border-radius: var(--igchat-radius);
	}
	.igchat--left .igchat__panel {
		inset-inline-start: 16px;
		inset-inline-end: auto;
	}
	.igchat__launcher-label {
		display: inline;
	}
}
@media (prefers-reduced-motion: reduce) {
	.igchat,
	.igchat *,
	.igchat *::before,
	.igchat *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
@media (forced-colors: active) {
	.igchat__bubble,
	.igchat__chip,
	.igchat__feedback-btn,
	.igchat__input {
		border: 1px solid CanvasText;
	}
}
.igchat__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}
