.tw-live-chat {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9999;
	display: flex;
	align-items: flex-end;
	flex-direction: column;
	gap: 12px;
	font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

.tw-live-chat [hidden] {
	display: none !important;
}

.tw-live-chat-conversation {
	display: flex;
	flex: 1;
	min-height: 0;
	flex-direction: column;
}

.tw-live-chat-conversation[hidden] {
	display: none !important;
}

.tw-live-chat .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.tw-live-chat-launcher {
	position: relative;
	width: 58px;
	height: 58px;
	min-height: 58px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
	box-shadow: 0 12px 32px rgba(16, 35, 63, 0.24);
	font: inherit;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.tw-live-chat-launcher:focus-visible {
	outline: 3px solid var(--barta-brand-color, #2146aa);
	outline-offset: 3px;
}

.tw-live-chat-launcher:hover {
	transform: translateY(-3px);
	filter: brightness(0.9);
	box-shadow: 0 16px 38px rgba(16, 35, 63, 0.3);
}

.tw-live-chat-launcher-icon {
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 50%;
	font-size: 16px;
}

.tw-live-chat-unread {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 21px;
	height: 21px;
	display: grid;
	place-items: center;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 999px;
	color: #fff;
	background: #d63638;
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
}

.tw-live-chat-panel {
	width: min(360px, calc(100vw - 32px));
	height: min(500px, calc(100dvh - 112px));
	min-height: 330px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(16, 35, 63, 0.1);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(16, 35, 63, 0.24);
	transform-origin: bottom right;
	animation: barta-panel-in 180ms ease-out;
}

.tw-live-chat-header {
	min-height: 72px;
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 16px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
}

.tw-live-chat-avatar {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 13px;
	background: rgba(255, 255, 255, 0.16);
	font-weight: 900;
}

.tw-live-chat-avatar img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.tw-live-chat-heading {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
}

.tw-live-chat-heading strong {
	font-size: 14px;
}

.tw-live-chat-heading small {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 11px;
}

.tw-live-chat-heading small i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #68e3a4;
	box-shadow: 0 0 0 3px rgba(104, 227, 164, 0.16);
}

.tw-live-chat-close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 9px;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.tw-live-chat-messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding: 16px;
	background: #f7f9fd;
}

.tw-chat-message {
	max-width: 86%;
	padding: 10px 12px;
	border-radius: 13px;
	font-size: 13px;
	line-height: 1.55;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.tw-chat-message-operator-header {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.tw-chat-message-avatar {
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	border: 1px solid #e6ebf4;
	border-radius: 50%;
	object-fit: cover;
	background: #f7f9fd;
}

.tw-chat-message-sender {
	color: var(--barta-brand-color, #2146aa);
	font-size: 10px;
	font-weight: 800;
}

.tw-chat-message-operator {
	align-self: flex-start;
	border: 1px solid #e6ebf4;
	border-bottom-left-radius: 4px;
	color: #1c2b45;
	background: #fff;
}

.tw-chat-message-visitor {
	align-self: flex-end;
	border-bottom-right-radius: 4px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
}

.tw-live-chat-status {
	min-height: 18px;
	padding: 0 14px;
	color: #b42318;
	font-size: 11px;
}

.tw-live-chat-form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	padding: 10px 12px 8px;
	border-top: 1px solid #edf0f5;
}

.tw-live-chat-form textarea {
	min-height: 42px;
	max-height: 96px;
	flex: 1;
	resize: vertical;
	padding: 11px 12px;
	border: 1px solid #dfe5ef;
	border-radius: 12px;
	color: #1c2b45;
	font: inherit;
	font-size: 13px;
	line-height: 1.4;
}

.tw-live-chat-form textarea:focus {
	border-color: var(--barta-brand-color, #2146aa);
	outline: 2px solid var(--barta-brand-color, #2146aa);
}

.tw-live-chat-form button {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	border: 0;
	border-radius: 12px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
	font-size: 22px;
	font-weight: 800;
	cursor: pointer;
}

.tw-live-chat-form button:disabled {
	opacity: 0.55;
	cursor: wait;
}

.tw-live-chat-visitor-form {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 8px;
	overflow-y: auto;
	padding: 18px;
}

.tw-live-chat-visitor-form p {
	margin: 0 0 8px;
	color: #64728b;
	font-size: 13px;
}

.tw-live-chat-visitor-form label {
	color: #273853;
	font-size: 12px;
	font-weight: 700;
}

.tw-live-chat-visitor-form input {
	min-height: 42px;
	padding: 8px 11px;
	border: 1px solid #d8e0ec;
	border-radius: 9px;
	font: inherit;
}

.tw-live-chat-visitor-form input:focus {
	border-color: var(--barta-brand-color, #2146aa);
	outline: 2px solid var(--barta-brand-color, #2146aa);
}

.tw-live-chat-visitor-form .tw-live-chat-visitor-status {
	min-height: 0;
	margin: 0;
	color: #b42318;
	font-size: 12px;
}

.tw-live-chat-visitor-form button {
	min-height: 44px;
	border: 0;
	border-radius: 10px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.tw-live-chat-visitor-form button:disabled {
	opacity: 0.55;
	cursor: wait;
}

.barta-contact-links {
	display: flex;
	justify-content: center;
	gap: 16px;
	padding: 2px 12px 8px;
}

.barta-contact-links a,
.barta-floating-links a {
	color: var(--barta-brand-color, #2146aa);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.barta-contact-links a:hover,
.barta-floating-links a:hover {
	text-decoration: underline;
}

.tw-live-chat-footnote {
	padding: 0 12px 10px;
	color: #8a97aa;
	font-size: 10px;
	text-align: center;
}

.barta-floating-links {
	display: flex;
	gap: 8px;
	padding: 12px 16px;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 12px 32px rgba(16, 35, 63, 0.24);
}

.barta-portal,
.barta-manager {
	box-sizing: border-box;
	max-width: 1060px;
	margin: 0 auto;
	padding: 48px 24px;
	color: #14213d;
	font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

.barta-page {
	min-height: 100vh;
	margin: 0;
	background: #f5f8ff;
}

.barta-skip-link {
	position: absolute;
	top: -50px;
	left: 16px;
	z-index: 10000;
	padding: 10px 14px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
}

.barta-skip-link:focus {
	top: 12px;
}

.barta-portal *,
.barta-manager * {
	box-sizing: border-box;
}

.barta-hero {
	max-width: 650px;
	margin: 0 auto 34px;
	text-align: center;
}

.barta-hero img {
	display: block;
	width: 58px;
	height: 58px;
	margin: 0 auto 12px;
	object-fit: contain;
}

.barta-eyebrow {
	margin: 0 0 10px;
	color: var(--barta-brand-color, #2146aa);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.barta-brand-inline {
	width: 22px;
	height: 22px;
	margin-right: 5px;
	vertical-align: middle;
	object-fit: contain;
}

.barta-hero h1,
.barta-manager h1 {
	margin: 0 0 12px;
	color: #14213d;
	font-size: clamp(32px, 5vw, 48px);
	line-height: 1.1;
}

.barta-hero > p:last-child,
.barta-manager-header > div > p:last-child {
	margin: 0;
	color: #5b6880;
	font-size: 16px;
	line-height: 1.65;
}

.barta-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.barta-option {
	display: flex;
	min-height: 230px;
	flex-direction: column;
	align-items: flex-start;
	gap: 11px;
	padding: 24px;
	border: 1px solid #e2e8f2;
	border-radius: 18px;
	color: inherit;
	background: #fff;
	box-shadow: 0 12px 34px rgba(20, 42, 84, 0.06);
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.barta-option:hover {
	transform: translateY(-4px);
	border-color: var(--barta-brand-color, #2146aa);
	box-shadow: 0 18px 42px rgba(20, 42, 84, 0.12);
}

.barta-option-icon {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	color: var(--barta-brand-color, #2146aa);
	background: #eef3ff;
	font-size: 22px;
	font-weight: 800;
}

.barta-option strong {
	font-size: 18px;
}

.barta-option > span:not(.barta-option-icon) {
	color: #64728b;
	font-size: 14px;
	line-height: 1.5;
}

.barta-option .barta-option-link {
	margin-top: auto;
	color: var(--barta-brand-color, #2146aa) !important;
	font-weight: 800;
}

.barta-option.is-unavailable {
	cursor: default;
	background: #f8f9fc;
}

.barta-option.is-unavailable:hover {
	transform: none;
	box-shadow: 0 12px 34px rgba(20, 42, 84, 0.06);
}

.barta-install {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 26px;
	padding: 22px 24px;
	border-radius: 18px;
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
}

.barta-manager-install {
	margin-top: 0;
	margin-bottom: 22px;
}

.barta-manager-install > div:last-child {
	display: flex;
	align-items: center;
	gap: 10px;
}

.barta-install strong {
	font-size: 17px;
}

.barta-install p {
	margin: 6px 0 0;
	color: rgba(255, 255, 255, 0.8);
	font-size: 13px;
}

.barta-install-button,
.barta-save-button {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	color: var(--barta-brand-color, #2146aa);
	background: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.barta-brandline {
	margin-top: 26px;
	color: #8190a8;
	font-size: 12px;
	text-align: center;
}

.barta-manager {
	max-width: 1120px;
}

.barta-manager-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.barta-manager-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.barta-manager h1 {
	font-size: 36px;
}

.barta-manager h2 {
	margin: 0 0 8px;
	font-size: 21px;
}

.barta-manager p {
	color: #64728b;
}

.barta-settings,
.barta-inbox {
	margin: 22px 0;
	padding: 24px;
	border: 1px solid #e2e8f2;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(20, 42, 84, 0.05);
}

.barta-settings-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin: 22px 0;
}

.barta-toggle {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	border: 1px solid #e2e8f2;
	border-radius: 12px;
}

.barta-toggle input {
	margin-top: 4px;
}

.barta-toggle span,
.barta-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.barta-toggle small {
	color: #73819a;
}

.barta-field {
	color: #273853;
	font-size: 13px;
	font-weight: 700;
}

.barta-field input {
	width: 100%;
	min-height: 42px;
	padding: 8px 11px;
	border: 1px solid #d8e0ec;
	border-radius: 9px;
	font: inherit;
	font-weight: 400;
}

.barta-field input[type="color"] {
	max-width: 100px;
	padding: 4px;
	cursor: pointer;
}

.barta-field small {
	color: #73819a;
	font-size: 12px;
	font-weight: 400;
}

.barta-manager .button-primary {
	border-color: var(--barta-brand-color, #2146aa);
	background: var(--barta-brand-color, #2146aa);
}

.barta-manager .button-primary:hover,
.barta-manager .button-primary:focus {
	filter: brightness(0.9);
	border-color: var(--barta-brand-color, #2146aa);
	background: var(--barta-brand-color, #2146aa);
}

.barta-field-wide {
	grid-column: 1 / -1;
}

.barta-save-button {
	color: #fff;
	background: var(--barta-brand-color, #2146aa);
}

.barta-notice {
	margin: 16px 0;
	padding: 12px 16px;
	border-left: 4px solid #21834a;
	background: #effaf3;
}

@keyframes barta-panel-in {
	from { opacity: 0; transform: translateY(8px) scale(0.97); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
	.barta-options {
		grid-template-columns: 1fr;
	}

	.barta-option {
		min-height: 190px;
	}

	.barta-manager-header,
	.barta-install {
		align-items: flex-start;
		flex-direction: column;
	}

	.barta-manager-install > div:last-child {
		align-items: flex-start;
		flex-direction: column;
	}

	.barta-settings-grid {
		grid-template-columns: 1fr;
	}

	.barta-field-wide {
		grid-column: auto;
	}

	.tw-live-chat {
		right: 14px;
		bottom: 14px;
	}

	.tw-live-chat-launcher {
		width: 52px;
		height: 52px;
		min-height: 52px;
	}

	.tw-live-chat-panel {
		height: min(480px, calc(100dvh - 92px));
	}
}

@media (prefers-reduced-motion: reduce) {
	.tw-live-chat *,
	.barta-option {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
