.dap-chat-widget {
	--dap-admin-bg: #ecfdf5;
	--dap-admin-text: #065f46;
	--dap-border-radius: 18px;
	--dap-bot-bg: #f3f4f6;
	--dap-bot-text: #111827;
	--dap-header-bg: #2563eb;
	--dap-header-text: #ffffff;
	--dap-custom-icon-size: 96px;
	--dap-icon-bg: #2563eb;
	--dap-icon-text: #ffffff;
	--dap-primary-color: #2563eb;
	--dap-send-bg: #2563eb;
	--dap-send-text: #ffffff;
	--dap-user-bg: #2563eb;
	--dap-user-text: #ffffff;
	--dap-window-height: 560px;
	--dap-window-width: 380px;
	align-items: flex-end;
	bottom: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: calc(100vw - 32px);
	pointer-events: none;
	position: fixed;
	right: 24px;
	-webkit-font-smoothing: antialiased;
	text-rendering: geometricPrecision;
	z-index: 999998;
}

.dap-chat-widget strong,
.dap-chat-widget b,
.dap-live-console strong,
.dap-live-console b {
	font-weight: 800;
}

.dap-widget-position-left {
	align-items: flex-start;
	left: 24px;
	right: auto;
}

.dap-widget-position-right {
	left: auto;
	right: 24px;
}

.dap-greeting-bubble {
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--dap-primary-color) 18%, transparent);
	border-radius: 999px;
	box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14);
	color: var(--dap-primary-color);
	font: 700 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	max-width: 260px;
	padding: 12px 16px;
	pointer-events: auto;
	position: absolute;
	right: 76px;
	top: 10px;
	white-space: nowrap;
}

.dap-widget-position-left .dap-greeting-bubble {
	left: 76px;
	right: auto;
}

.dap-widget-custom-image-mode .dap-greeting-bubble {
	left: auto;
	margin: 0;
	max-width: min(320px, calc(100vw - 32px));
	position: static;
	right: auto;
	top: auto;
	white-space: normal;
}

.dap-widget-custom-image-mode.dap-widget-position-right .dap-greeting-bubble {
	text-align: right;
}

.dap-widget-custom-image-mode.dap-widget-position-left .dap-greeting-bubble {
	text-align: left;
}

.dap-chat-widget.dap-chat-open .dap-greeting-bubble {
	display: none;
}

.dap-chat-button {
	align-items: center;
	background: var(--dap-icon-bg);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
	color: var(--dap-icon-text);
	cursor: pointer;
	display: inline-flex;
	height: 64px;
	justify-content: center;
	padding: 0;
	pointer-events: auto;
	position: relative;
	transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
	width: 64px;
	z-index: 999999;
}

.dap-chat-widget.dap-chat-open .dap-chat-button {
	display: none;
}

.dap-chat-button:hover,
.dap-chat-button:focus {
	background: var(--dap-icon-bg);
	box-shadow: 0 20px 42px rgba(15, 23, 42, 0.28);
	filter: brightness(0.94);
	transform: translateY(-2px);
}

.dap-chat-button:focus {
	outline: 3px solid color-mix(in srgb, var(--dap-primary-color) 28%, transparent);
	outline-offset: 3px;
}

.dap-chat-button__icon {
	display: block;
	height: 32px;
	object-fit: contain;
	width: 32px;
}

.dap-chat-button__icon--custom {
	border-radius: 50%;
	height: 42px;
	width: 42px;
}

.dap-widget-button-image-mode {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	height: var(--dap-custom-icon-size) !important;
	line-height: 0;
	min-height: 0;
	min-width: 0;
	overflow: visible;
	padding: 0 !important;
	width: var(--dap-custom-icon-size) !important;
}

.dap-widget-button-image-mode:hover,
.dap-widget-button-image-mode:focus {
	background: transparent !important;
	box-shadow: none !important;
	filter: none;
}

.dap-widget-button-image-mode .dap-chat-button__icon--custom {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	display: block;
	height: 100%;
	margin: 0;
	object-fit: contain;
	padding: 0;
	width: 100%;
}

.dap-chat-button__text {
	color: var(--dap-icon-text);
	display: inline-flex;
	font: 700 28px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dap-chat-window {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: var(--dap-border-radius);
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.26);
	display: none;
	flex-direction: column;
	height: var(--dap-window-height);
	overflow: hidden;
	pointer-events: auto;
	width: var(--dap-window-width);
	z-index: 999999;
}

.dap-chat-widget.dap-chat-open .dap-chat-window {
	display: flex;
}

.dap-chat-header {
	align-items: center;
	background: var(--dap-header-bg);
	color: var(--dap-header-text);
	display: flex;
	flex: 0 0 auto;
	justify-content: space-between;
	padding: 18px 18px 16px;
}

.dap-chat-header__content {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.dap-chat-header__title {
	font: 800 16px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dap-chat-header__subtitle {
	color: var(--dap-header-text);
	font: 500 13px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	opacity: 0.82;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dap-chat-header__actions {
	align-items: center;
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
	margin-left: 12px;
}

.dap-new-conversation {
	background: color-mix(in srgb, var(--dap-header-text) 16%, transparent);
	border: 0;
	border-radius: 999px;
	color: var(--dap-header-text);
	cursor: pointer;
	font: 800 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	max-width: 132px;
	min-height: 32px;
	overflow: hidden;
	padding: 0 10px;
	text-overflow: ellipsis;
	transition: background-color 160ms ease, transform 160ms ease;
	white-space: nowrap;
}

.dap-new-conversation:hover,
.dap-new-conversation:focus {
	background: color-mix(in srgb, var(--dap-header-text) 24%, transparent);
	transform: translateY(-1px);
}

.dap-new-conversation:focus {
	outline: 2px solid color-mix(in srgb, var(--dap-header-text) 70%, transparent);
	outline-offset: 2px;
}

.dap-chat-close {
	align-items: center;
	background: color-mix(in srgb, var(--dap-header-text) 16%, transparent);
	border: 0;
	border-radius: 50%;
	color: var(--dap-header-text);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-size: 24px;
	height: 36px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: background-color 160ms ease, transform 160ms ease;
	width: 36px;
}

.dap-chat-close:hover,
.dap-chat-close:focus {
	background: color-mix(in srgb, var(--dap-header-text) 24%, transparent);
	transform: scale(1.03);
}

.dap-chat-close:focus {
	outline: 2px solid color-mix(in srgb, var(--dap-header-text) 70%, transparent);
	outline-offset: 2px;
}

.dap-chat-messages {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	padding: 18px;
	scroll-behavior: smooth;
}

.dap-chat-message {
	display: flex;
	width: 100%;
}

.dap-chat-message--bot {
	justify-content: flex-start;
}

.dap-chat-message--admin,
.dap-message-admin {
	justify-content: flex-start;
}

.dap-chat-message--user {
	justify-content: flex-end;
}

.dap-chat-message--system,
.dap-message-system {
	justify-content: center;
}

.dap-chat-message__bubble {
	border-radius: var(--dap-border-radius);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
	font: 500 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	max-width: 78%;
	overflow-wrap: anywhere;
	padding: 11px 14px;
	unicode-bidi: plaintext;
	word-break: break-word;
}

.dap-chat-message__bubble p,
.dap-live-console-message__bubble p {
	margin: 0 0 0.62em;
}

.dap-chat-message__bubble p:last-child,
.dap-live-console-message__bubble p:last-child {
	margin-bottom: 0;
}

.dap-chat-message__bubble strong,
.dap-live-console-message__bubble strong {
	font-weight: 800;
}

.dap-chat-message__bubble em,
.dap-live-console-message__bubble em {
	font-style: italic;
}

.dap-chat-message__bubble ul,
.dap-chat-message__bubble ol,
.dap-live-console-message__bubble ul,
.dap-live-console-message__bubble ol {
	margin: 0.35em 0 0.65em;
	padding-inline-start: 1.25rem;
}

.dap-chat-message__bubble li,
.dap-live-console-message__bubble li {
	margin: 0.24em 0;
}

.dap-chat-message__bubble ul:last-child,
.dap-chat-message__bubble ol:last-child,
.dap-live-console-message__bubble ul:last-child,
.dap-live-console-message__bubble ol:last-child {
	margin-bottom: 0;
}

.dap-message-rtl {
	direction: rtl;
	text-align: right;
	unicode-bidi: plaintext;
}

.dap-message-ltr {
	direction: ltr;
	text-align: left;
	unicode-bidi: plaintext;
}

.dap-message-rtl ul,
.dap-message-rtl ol {
	padding-inline-end: 1.25rem;
	padding-inline-start: 0;
}

.dap-chat-message--system .dap-message-rtl,
.dap-chat-message--system .dap-message-ltr,
.dap-live-message-system .dap-message-rtl,
.dap-live-message-system .dap-message-ltr,
.dap-live-console-message--system .dap-message-rtl,
.dap-live-console-message--system .dap-message-ltr {
	text-align: center;
}

.dap-chat-message--bot .dap-chat-message__bubble {
	background: var(--dap-bot-bg);
	border-bottom-left-radius: 6px;
	color: var(--dap-bot-text);
}

.dap-chat-message--admin .dap-chat-message__bubble,
.dap-message-admin .dap-chat-message__bubble {
	background: var(--dap-admin-bg);
	border: 1px solid color-mix(in srgb, var(--dap-admin-text) 18%, transparent);
	border-bottom-left-radius: 6px;
	color: var(--dap-admin-text);
}

.dap-chat-message--user .dap-chat-message__bubble {
	background: var(--dap-user-bg);
	border-bottom-right-radius: 6px;
	color: var(--dap-user-text);
}

.dap-chat-message--system .dap-chat-message__bubble,
.dap-message-system .dap-chat-message__bubble {
	background: transparent;
	box-shadow: none;
	color: #64748b;
	font-size: 12px;
	font-weight: 800;
	max-width: 88%;
	padding: 3px 8px;
	text-align: center;
}

.dap-typing-indicator {
	color: #64748b;
	display: none;
	flex: 0 0 auto;
	font: 700 13px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 0 18px 12px;
}

.dap-location-notice {
	background: #ecfdf5;
	border-top: 1px solid color-mix(in srgb, var(--dap-primary-color) 16%, transparent);
	color: var(--dap-primary-color);
	display: none !important;
	flex: 0 0 auto;
	font: 700 12px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 10px 14px;
}

.dap-contact-form-message {
	justify-content: flex-start;
	max-width: 100%;
}

.dap-contact-form-card {
	background: #ffffff;
	border: 1px solid color-mix(in srgb, var(--dap-primary-color) 18%, transparent);
	border-radius: var(--dap-border-radius);
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
	box-sizing: border-box;
	color: #0f172a;
	display: grid;
	gap: 11px;
	max-width: 100%;
	padding: 16px;
	position: relative;
	width: min(100%, 330px);
}

.dap-contact-form-title {
	color: #0f172a;
	display: block;
	font: 800 15px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding-inline-end: 28px;
}

.dap-contact-form-close {
	align-items: center;
	background: #e2e8f0;
	border: 0;
	border-radius: 50%;
	color: #334155;
	cursor: pointer;
	display: inline-flex;
	font-size: 20px;
	height: 26px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 10px;
	top: 10px;
	width: 26px;
}

.dap-contact-form-card[dir="rtl"] .dap-contact-form-close {
	left: 10px;
	right: auto;
}

.dap-contact-form-close:hover,
.dap-contact-form-close:focus {
	background: #cbd5e1;
	color: #0f172a;
}

.dap-contact-form-field {
	color: #475569;
	display: grid;
	font: 800 11px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	gap: 6px;
	letter-spacing: 0;
}

.dap-contact-form-field input,
.dap-contact-form-field textarea {
	background: #f1f5f9;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 13px;
	box-sizing: border-box;
	box-shadow: none;
	color: #0f172a;
	display: block;
	font: 600 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 42px;
	padding: 10px 12px;
	width: 100%;
}

.dap-contact-form-field textarea {
	min-height: 96px;
	resize: vertical;
}

.dap-contact-form-field input::placeholder,
.dap-contact-form-field textarea::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.dap-contact-form-field input:focus,
.dap-contact-form-field textarea:focus {
	background: #ffffff;
	border-color: var(--dap-primary-color);
	outline: 3px solid color-mix(in srgb, var(--dap-primary-color) 18%, transparent);
}

.dap-contact-form-submit {
	background: var(--dap-send-bg);
	border: 0;
	border-radius: 14px;
	box-shadow: 0 12px 22px color-mix(in srgb, var(--dap-send-bg) 22%, transparent);
	color: var(--dap-send-text);
	cursor: pointer;
	font: 800 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 46px;
	padding: 0 16px;
	transition: filter 160ms ease, transform 160ms ease;
	width: 100%;
}

.dap-contact-form-submit:hover,
.dap-contact-form-submit:focus {
	filter: brightness(0.94);
	transform: translateY(-1px);
}

.dap-contact-form-submit:disabled {
	cursor: progress;
	opacity: 0.72;
	transform: none;
}

.dap-contact-form-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 12px;
	color: #b91c1c;
	font: 800 12px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 9px 10px;
}

.dap-contact-form-error[hidden] {
	display: none !important;
}

.dap-contact-form-card.dap-message-rtl {
	direction: rtl;
	text-align: right;
}

.dap-contact-form-card.dap-message-ltr {
	direction: ltr;
	text-align: left;
}

.dap-prechat-form {
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	flex: 0 0 auto;
	padding: 14px;
}

.dap-prechat-form[hidden] {
	display: none !important;
}

.dap-prechat-form input {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 14px;
	box-shadow: none;
	color: #0f172a;
	display: block;
	font: 500 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 0 0 10px;
	min-height: 42px;
	padding: 0 13px;
	width: 100%;
}

.dap-prechat-form input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.dap-prechat-form input:focus {
	background: #fff;
	border-color: var(--dap-primary-color);
	outline: 3px solid color-mix(in srgb, var(--dap-primary-color) 18%, transparent);
}

.dap-prechat-form--error input {
	border-color: #dc2626;
}

.dap-prechat-actions {
	display: flex;
	gap: 10px;
}

.dap-prechat-submit,
.dap-prechat-skip {
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	font: 700 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 42px;
	padding: 0 16px;
	transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dap-prechat-submit {
	background: var(--dap-send-bg);
	color: var(--dap-send-text);
	flex: 1 1 auto;
}

.dap-prechat-submit:hover,
.dap-prechat-submit:focus {
	background: var(--dap-send-bg);
	filter: brightness(0.94);
	transform: translateY(-1px);
}

.dap-prechat-skip {
	background: #e2e8f0;
	color: #334155;
	flex: 0 0 auto;
}

.dap-prechat-skip:hover,
.dap-prechat-skip:focus {
	background: #cbd5e1;
	color: #0f172a;
	transform: translateY(-1px);
}

.dap-chat-input-area {
	align-items: center;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
	padding: 14px;
}

.dap-chat-input-area[hidden] {
	display: none !important;
}

.dap-chat-input {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 999px;
	box-shadow: none;
	color: #0f172a;
	flex: 1 1 auto;
	font: 500 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 42px;
	min-width: 0;
	padding: 0 14px;
}

.dap-chat-input:focus {
	background: #fff;
	border-color: var(--dap-primary-color);
	outline: 3px solid color-mix(in srgb, var(--dap-primary-color) 18%, transparent);
}

.dap-chat-send {
	background: var(--dap-send-bg);
	border: 0;
	border-radius: 999px;
	color: var(--dap-send-text);
	cursor: pointer;
	flex: 0 0 auto;
	font: 700 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 42px;
	padding: 0 16px;
	transition: background-color 160ms ease, transform 160ms ease;
}

.dap-chat-send:hover,
.dap-chat-send:focus {
	background: var(--dap-send-bg);
	filter: brightness(0.94);
	transform: translateY(-1px);
}

.dap-chat-send:focus {
	outline: 3px solid color-mix(in srgb, var(--dap-primary-color) 22%, transparent);
	outline-offset: 2px;
}

.dap-chat-widget.dap-chat-closed .dap-new-conversation {
	background: #ffffff;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
	color: var(--dap-primary-color);
}

.dap-chat-widget.dap-chat-closed .dap-chat-input,
.dap-chat-widget.dap-chat-closed .dap-chat-send {
	cursor: not-allowed;
	opacity: 0.64;
}

.dap-live-console {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.1);
	border-radius: 12px;
	box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
	color: #0f172a;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	margin: 24px auto;
	max-width: 980px;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
	text-rendering: geometricPrecision;
}

.dap-live-console--error {
	background: #fff;
	border-left: 4px solid #dc2626;
	padding: 18px;
}

.dap-live-console--error p {
	margin: 0;
}

.dap-live-console__header {
	align-items: center;
	background: #0f766e;
	color: #fff;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	padding: 20px;
}

.dap-live-console__header h2 {
	color: inherit;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 6px;
}

.dap-live-console__header p {
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	margin: 0;
}

.dap-live-console__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.dap-live-console__button {
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	font: 700 14px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 40px;
	padding: 0 16px;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.dap-live-console__button:hover,
.dap-live-console__button:focus {
	transform: translateY(-1px);
}

.dap-live-console__button--primary {
	background: #0f766e;
	color: #fff;
}

.dap-live-console__header .dap-live-console__button--primary {
	background: #fff;
	color: #0f766e;
}

.dap-live-console__button--secondary {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.dap-live-console__button--danger,
.dap-close-conversation-btn {
	background: #dc2626;
	color: #ffffff;
}

.dap-live-console__button--primary:hover,
.dap-live-console__button--primary:focus {
	background: #115e59;
	color: #fff;
}

.dap-live-console__header .dap-live-console__button--primary:hover,
.dap-live-console__header .dap-live-console__button--primary:focus {
	background: #ccfbf1;
	color: #134e4a;
}

.dap-live-console__button--secondary:hover,
.dap-live-console__button--secondary:focus {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
}

.dap-live-console__button--danger:hover,
.dap-live-console__button--danger:focus,
.dap-close-conversation-btn:hover,
.dap-close-conversation-btn:focus {
	background: #b91c1c;
	color: #ffffff;
}

.dap-live-console__lead-card {
	background: #fff;
	border-bottom: 1px solid rgba(15, 23, 42, 0.08);
	padding: 18px 20px;
}

.dap-live-console__lead-card h3 {
	font-size: 16px;
	font-weight: 800;
	margin: 0 0 14px;
}

.dap-live-console__lead-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dap-live-console__lead-field {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 8px;
	padding: 10px;
}

.dap-live-console__lead-field span {
	color: #64748b;
	display: block;
	font-size: 12px;
	font-weight: 700;
	margin-bottom: 4px;
}

.dap-live-console__lead-field strong {
	color: #0f172a;
	display: block;
	font-size: 14px;
	font-weight: 800;
	overflow-wrap: anywhere;
}

.dap-live-console__messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 560px;
	overflow-y: auto;
	padding: 18px 20px;
}

.dap-live-console__empty {
	color: #64748b;
	font-weight: 700;
	padding: 18px;
	text-align: center;
}

.dap-live-console-message {
	display: flex;
	flex-direction: column;
	max-width: 76%;
}

.dap-live-console-message--user {
	align-self: flex-end;
}

.dap-live-console-message--bot,
.dap-live-console-message--admin {
	align-self: flex-start;
}

.dap-live-console-message--system {
	align-self: center;
	max-width: 92%;
	text-align: center;
}

.dap-live-console-message__meta {
	color: #64748b;
	font-size: 11px;
	font-weight: 800;
	margin-bottom: 4px;
}

.dap-live-console-message__bubble {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 5px 16px rgba(15, 23, 42, 0.06);
	font-size: 14px;
	line-height: 1.45;
	overflow-wrap: anywhere;
	padding: 11px 13px;
	unicode-bidi: plaintext;
	word-break: break-word;
}

.dap-live-console-message--user .dap-live-console-message__bubble {
	background: #0f766e;
	border-bottom-right-radius: 6px;
	color: #fff;
}

.dap-live-console-message--bot .dap-live-console-message__bubble {
	background: #fff;
	border-bottom-left-radius: 6px;
	color: #1f2937;
}

.dap-live-console-message--admin .dap-live-console-message__bubble {
	background: #dbeafe;
	border: 1px solid rgba(37, 99, 235, 0.14);
	border-bottom-left-radius: 6px;
	color: #1e3a8a;
}

.dap-live-console-message--system .dap-live-console-message__bubble {
	background: transparent;
	box-shadow: none;
	color: #64748b;
	font-size: 12px;
	font-weight: 800;
	padding: 4px 8px;
}

.dap-live-console__reply {
	align-items: stretch;
	background: #fff;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 10px;
	height: auto;
	overflow: visible;
	padding: 16px 20px;
}

.dap-quick-replies {
	display: flex;
	flex: 1 0 100%;
	flex-wrap: wrap;
	gap: 6px;
	height: auto;
	max-width: 100%;
	overflow: visible;
	width: 100%;
}

.quick-replies-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	height: auto;
	max-width: 100%;
	overflow: visible;
	width: 100%;
}

.dap-quick-reply-btn {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 999px;
	color: #334155;
	cursor: pointer;
	font: 700 12px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	padding: 7px 10px;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.dap-quick-reply-btn:hover,
.dap-quick-reply-btn:focus {
	background: #ecfdf5;
	border-color: rgba(15, 118, 110, 0.34);
	color: #0f766e;
}

.dap-conversation-status-badge {
	align-items: center;
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	padding: 5px 9px;
	vertical-align: middle;
}

.dap-conversation-status-open {
	background: #dcfce7;
	color: #15803d;
}

.dap-conversation-status-closed {
	background: #fee2e2;
	color: #b91c1c;
}

.dap-live-console--closed .dap-live-composer textarea,
.dap-live-console--closed .dap-live-composer .dap-live-console__button--primary {
	opacity: 0.7;
}

.dap-live-console--closed .dap-live-composer textarea {
	cursor: not-allowed;
}

.dap-live-console--closed .dap-quick-reply-btn {
	opacity: 0.55;
	pointer-events: none;
}

.dap-live-console__reply textarea {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 12px;
	box-shadow: none;
	box-sizing: border-box;
	color: #0f172a;
	display: block;
	flex: 0 0 auto;
	font: 500 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 100px;
	padding: 10px 12px;
	resize: vertical;
	width: 100%;
}

.dap-live-console__reply textarea:focus {
	background: #fff;
	border-color: #0f766e;
	outline: 3px solid rgba(15, 118, 110, 0.14);
}

.dap-live-console__notice {
	color: #0f766e;
	font-size: 13px;
	font-weight: 800;
	min-height: 18px;
	padding: 0 20px 16px;
}

.dap-live-console__notice--error {
	color: #b91c1c;
}

.dap-live-console {
	background: transparent;
	border: 0;
	box-shadow: none;
	display: grid;
	gap: 16px;
	max-width: 1100px;
	overflow: visible;
}

.dap-live-header,
.dap-live-lead-card,
.dap-live-messages,
.dap-live-composer {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
	overflow: hidden;
}

.dap-live-header {
	align-items: center;
	background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
	color: #ffffff;
	display: flex;
	gap: 18px;
	justify-content: space-between;
	padding: 22px;
}

.dap-live-header h2 {
	color: inherit;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.2;
	margin: 0 0 6px;
}

.dap-live-header p {
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	margin: 0;
}

.dap-live-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.dap-live-lead-card {
	padding: 18px 20px;
}

.dap-live-lead-card h3 {
	font-size: 16px;
	margin: 0 0 14px;
}

.dap-live-messages {
	background: #f8fafc;
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 580px;
	min-height: 360px;
	overflow-y: auto;
	padding: 20px;
}

.dap-live-message {
	display: flex;
	flex-direction: column;
	max-width: 72%;
}

.dap-live-message-user {
	align-self: flex-end;
}

.dap-live-message-admin,
.dap-live-message-bot {
	align-self: flex-start;
}

.dap-live-message-system {
	align-self: center;
	max-width: 92%;
	text-align: center;
}

.dap-live-message-user .dap-live-console-message__meta {
	text-align: right;
}

.dap-live-message .dap-live-console-message__bubble {
	border-radius: 18px;
	font-size: 14px;
	line-height: 1.5;
	padding: 12px 14px;
}

.dap-live-message-user .dap-live-console-message__bubble {
	background: #0f766e;
	border-bottom-right-radius: 6px;
	color: #ffffff;
}

.dap-live-message-admin .dap-live-console-message__bubble {
	background: #dbeafe;
	border: 1px solid rgba(37, 99, 235, 0.14);
	border-bottom-left-radius: 6px;
	color: #1e3a8a;
}

.dap-live-message-bot .dap-live-console-message__bubble {
	background: #ffffff;
	border: 1px solid rgba(15, 23, 42, 0.06);
	border-bottom-left-radius: 6px;
	color: #1f2937;
}

.dap-live-message-system .dap-live-console-message__bubble {
	background: transparent;
	box-shadow: none;
	color: #64748b;
	font-size: 12px;
	font-weight: 800;
	padding: 4px 8px;
}

.dap-live-composer {
	align-items: stretch;
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 12px;
	height: auto;
	overflow: visible;
	padding: 16px;
}

.dap-live-composer textarea {
	background: #f8fafc;
	border: 1px solid rgba(15, 23, 42, 0.14);
	border-radius: 12px;
	box-shadow: none;
	box-sizing: border-box;
	color: #0f172a;
	display: block;
	flex: 0 0 auto;
	font: 500 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	min-height: 100px;
	padding: 12px;
	resize: vertical;
	width: 100%;
}

.dap-live-composer textarea:focus {
	background: #ffffff;
	border-color: #0f766e;
	outline: 3px solid rgba(15, 118, 110, 0.14);
}

.dap-live-composer .dap-live-console__button--primary {
	align-self: flex-start;
	box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
	min-width: 132px;
}

@media (max-width: 480px) {
	.dap-chat-widget {
		bottom: max(12px, env(safe-area-inset-bottom));
		max-width: calc(100vw - 24px);
		right: 12px;
	}

	.dap-widget-position-left {
		left: 12px;
		right: auto;
	}

	.dap-widget-position-right {
		left: auto;
		right: 12px;
	}

	.dap-chat-window {
		border-radius: min(var(--dap-border-radius), 18px);
		height: min(var(--dap-window-height), calc(100vh - 40px));
		width: min(var(--dap-window-width), calc(100vw - 24px));
	}

	.dap-chat-message__bubble {
		font-size: 15px;
		font-weight: 500;
		line-height: 1.6;
		padding: 12px 14px;
	}

	.dap-chat-message--bot .dap-chat-message__bubble,
	.dap-chat-message--admin .dap-chat-message__bubble,
	.dap-message-admin .dap-chat-message__bubble {
		max-width: 92%;
	}

	.dap-chat-message--user .dap-chat-message__bubble {
		max-width: 90%;
	}

	.dap-contact-form-card {
		padding: 14px;
		width: 100%;
	}

	.dap-contact-form-field input,
	.dap-contact-form-field textarea {
		font-size: 15px;
		line-height: 1.45;
		min-height: 44px;
	}

	.dap-contact-form-field textarea {
		min-height: 92px;
	}

	.dap-chat-message__bubble ul,
	.dap-chat-message__bubble ol,
	.dap-live-console-message__bubble ul,
	.dap-live-console-message__bubble ol {
		margin-top: 0.45em;
		padding-inline-start: 1.2rem;
	}

	.dap-message-rtl ul,
	.dap-message-rtl ol {
		padding-inline-end: 1.2rem;
		padding-inline-start: 0;
	}

	.dap-new-conversation {
		max-width: 104px;
	}

	.dap-chat-button {
		height: 60px;
		width: 60px;
	}

	.dap-widget-button-image-mode {
		height: min(var(--dap-custom-icon-size), 120px) !important;
		width: min(var(--dap-custom-icon-size), 120px) !important;
	}

	.dap-greeting-bubble {
		max-width: calc(100vw - 104px);
		right: 70px;
		white-space: normal;
	}

	.dap-widget-position-left .dap-greeting-bubble {
		left: 70px;
		right: auto;
	}

	.dap-widget-custom-image-mode .dap-greeting-bubble {
		left: auto;
		max-width: calc(100vw - 24px);
		position: static;
		right: auto;
		top: auto;
	}

	.dap-live-console__header,
	.dap-live-console__reply,
	.dap-live-header,
	.dap-live-composer {
		align-items: stretch;
		flex-direction: column;
	}

	.dap-live-console__actions,
	.dap-live-actions {
		justify-content: flex-start;
	}

	.dap-live-console__lead-grid {
		grid-template-columns: 1fr;
	}

	.dap-live-console-message {
		max-width: 92%;
	}

	.dap-live-console-message__bubble {
		font-size: 15px;
		line-height: 1.6;
		padding: 12px 14px;
	}

	.dap-live-console {
		margin: 14px auto;
	}

	.dap-live-messages {
		min-height: 320px;
		padding: 14px;
	}

	.dap-live-message {
		max-width: 92%;
	}

	.dap-live-composer .dap-live-console__button--primary {
		width: 100%;
	}
}

/* Stable secretary console layout. Keep composer elements stacked and readable. */
.dap-live-console.dap-live-console {
	box-sizing: border-box;
	display: grid;
	gap: 16px;
	margin: 24px auto;
	max-width: none;
	overflow: visible;
	width: min(1100px, calc(100vw - 32px));
}

.dap-live-console > .dap-live-header,
.dap-live-console > .dap-live-lead-card,
.dap-live-console > .dap-live-messages,
.dap-live-console > .dap-live-composer,
.dap-live-console > .dap-live-console__reply,
.dap-live-console > .dap-live-console__notice {
	box-sizing: border-box;
	max-width: 100%;
	width: 100%;
}

.dap-live-console > .dap-live-composer,
.dap-live-console > .dap-live-console__reply,
.dap-live-composer.dap-live-console__reply {
	align-items: stretch !important;
	display: flex !important;
	flex-direction: column !important;
	flex-wrap: nowrap !important;
	gap: 12px;
	overflow: visible;
}

.dap-live-console .quick-replies-wrapper,
.dap-live-console .dap-quick-replies {
	align-items: center;
	box-sizing: border-box;
	display: flex !important;
	flex: 0 0 auto !important;
	flex-wrap: wrap !important;
	gap: 8px;
	max-width: 100%;
	order: 1;
	overflow: visible;
	width: 100%;
}

.dap-live-console .dap-quick-reply-btn {
	border-radius: 999px;
	box-sizing: border-box;
	max-width: 100%;
	min-height: 38px;
	padding: 9px 12px;
	white-space: normal;
}

.dap-live-console textarea[data-dap-console-reply],
.dap-live-console .dap-live-composer textarea,
.dap-live-console .dap-live-console__reply textarea {
	box-sizing: border-box !important;
	display: block !important;
	float: none !important;
	flex: 0 0 auto !important;
	height: auto;
	max-width: 100% !important;
	min-height: 100px;
	order: 2;
	position: static !important;
	width: 100% !important;
}

.dap-live-console .dap-live-composer .dap-live-console__button--primary,
.dap-live-console .dap-live-console__reply .dap-live-console__button--primary {
	align-self: flex-start;
	box-sizing: border-box;
	display: inline-flex;
	justify-content: center;
	margin-top: 0;
	order: 3;
}

@media (max-width: 640px) {
	.dap-live-console.dap-live-console {
		margin: 12px auto;
		width: calc(100vw - 20px);
	}

	.dap-live-console > .dap-live-header {
		align-items: stretch;
		flex-direction: column;
	}

	.dap-live-console .dap-live-actions,
	.dap-live-console .dap-live-console__actions {
		justify-content: flex-start;
	}

	.dap-live-console .dap-live-composer .dap-live-console__button--primary,
	.dap-live-console .dap-live-console__reply .dap-live-console__button--primary {
		width: 100%;
	}
}
