.custom-mail-ai-contact-shell {
	margin: 24px 0;
}

.custom-mail-ai-contact-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.custom-mail-ai-contact-head h2 {
	margin: 0 0 8px;
	font-size: 28px;
	line-height: 1.2;
}

.custom-mail-ai-contact-head p {
	margin: 0 0 20px;
	color: #475569;
	max-width: 720px;
}

.custom-mail-ai-contact-notice {
	margin-bottom: 16px;
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 14px;
}

.custom-mail-ai-contact-notice.is-success {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
}

.custom-mail-ai-contact-notice.is-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.custom-mail-ai-contact-notice.is-info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1d4ed8;
}

.custom-mail-ai-contact-form {
	display: grid;
	gap: 16px;
}

.custom-mail-ai-contact-field {
	display: grid;
	gap: 6px;
}

.custom-mail-ai-contact-field span {
	font-weight: 700;
	color: #0f172a;
}

.custom-mail-ai-contact-field input,
.custom-mail-ai-contact-field textarea {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	padding: 12px 14px;
	background: #fff;
	box-sizing: border-box;
	font: inherit;
	color: #0f172a;
}

.custom-mail-ai-contact-field input[type="file"] {
	padding: 10px 12px;
	background: #f8fafc;
}

.custom-mail-ai-contact-field input:focus,
.custom-mail-ai-contact-field textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
	outline: none;
}

.custom-mail-ai-contact-field input[type="file"]:focus {
	background: #fff;
}

.custom-mail-ai-contact-actions {
	margin: 4px 0 0;
}

.custom-mail-ai-contact-form .button.button-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border: 0;
	border-radius: 12px;
	padding: 0 18px;
	background: #2563eb;
	color: #fff;
	font-weight: 700;
	box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.custom-mail-ai-contact-form .button.button-primary:hover,
.custom-mail-ai-contact-form .button.button-primary:focus {
	background: #1d4ed8;
	color: #fff;
}

.custom-mail-ai-contact-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.custom-mail-ai-newsletter-shell {
	margin: 24px 0;
}

.custom-mail-ai-newsletter-card {
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
	border: 1px solid #cfe0ff;
	border-radius: 24px;
	padding: 28px;
	box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.custom-mail-ai-newsletter-card::before {
	content: '';
	position: absolute;
	inset: 0 0 auto;
	height: 5px;
	background: linear-gradient(90deg, #2563eb 0%, #0f766e 55%, #22c55e 100%);
}

.custom-mail-ai-newsletter-head h2 {
	margin: 0 0 10px;
	font-size: 30px;
	line-height: 1.15;
	color: #0f172a;
}

.custom-mail-ai-newsletter-head p {
	margin: 0 0 22px;
	max-width: 760px;
	color: #475569;
	font-size: 15px;
	line-height: 1.65;
}

.custom-mail-ai-newsletter-form {
	display: grid;
	gap: 16px;
}

.custom-mail-ai-field-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.custom-mail-ai-newsletter-form .custom-mail-ai-field {
	display: grid;
	gap: 6px;
}

.custom-mail-ai-newsletter-form .custom-mail-ai-field span {
	font-weight: 700;
	color: #0f172a;
}

.custom-mail-ai-newsletter-form .custom-mail-ai-field input,
.custom-mail-ai-newsletter-form .custom-mail-ai-field textarea {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
	padding: 12px 14px;
	background: #fff;
	box-sizing: border-box;
	font: inherit;
	color: #0f172a;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.custom-mail-ai-newsletter-form .custom-mail-ai-field input:focus,
.custom-mail-ai-newsletter-form .custom-mail-ai-field textarea:focus {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
	outline: none;
}

.custom-mail-ai-newsletter-consent {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 15px 16px;
	border: 1px solid #dbeafe;
	border-radius: 16px;
	background: #f8fbff;
	color: #0f172a;
	line-height: 1.5;
}

.custom-mail-ai-newsletter-consent input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.custom-mail-ai-newsletter-actions {
	margin: 4px 0 0;
}

.custom-mail-ai-newsletter-form .button.button-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border: 0;
	border-radius: 14px;
	padding: 0 20px;
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.custom-mail-ai-newsletter-form .button.button-primary:hover,
.custom-mail-ai-newsletter-form .button.button-primary:focus {
	background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
	color: #fff;
}

@media (max-width: 640px) {
	.custom-mail-ai-contact-card {
		padding: 18px;
	}

	.custom-mail-ai-contact-head h2 {
		font-size: 24px;
	}

	.custom-mail-ai-newsletter-card {
		padding: 20px;
		border-radius: 20px;
	}

	.custom-mail-ai-newsletter-head h2 {
		font-size: 24px;
	}

	.custom-mail-ai-field-row {
		grid-template-columns: 1fr;
	}

	.custom-mail-ai-newsletter-consent {
		align-items: flex-start;
	}
}

/* Živý rozhovor návštevníkov */
.custom-mail-ai-live-widget {
	--cmai-live-accent: #2563eb;
	position: fixed;
	z-index: 99999;
	right: 22px;
	bottom: 22px;
	font-family: inherit;
}

.custom-mail-ai-live-widget.is-left {
	right: auto;
	left: 22px;
}

.custom-mail-ai-live-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	border: 0;
	border-radius: 999px;
	padding: 0 20px;
	background: var(--cmai-live-accent);
	color: #fff;
	font-weight: 800;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
	cursor: pointer;
}

.custom-mail-ai-live-toggle:hover,
.custom-mail-ai-live-toggle:focus {
	filter: brightness(0.95);
	outline: none;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28), 0 0 0 4px rgba(37, 99, 235, 0.16);
}

.custom-mail-ai-live-toggle-dot {
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #22c55e;
	box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.18);
}

.custom-mail-ai-live-panel {
	position: absolute;
	right: 0;
	bottom: 66px;
	display: grid;
	grid-template-rows: auto 1fr auto auto;
	width: min(380px, calc(100vw - 32px));
	max-height: min(650px, calc(100vh - 110px));
	overflow: hidden;
	border: 1px solid rgba(148, 163, 184, 0.28);
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.custom-mail-ai-live-widget.is-left .custom-mail-ai-live-panel {
	right: auto;
	left: 0;
}

.custom-mail-ai-live-panel[hidden] {
	display: none;
}

.custom-mail-ai-live-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 18px 16px;
	background: linear-gradient(135deg, var(--cmai-live-accent), #0f172a);
	color: #fff;
}

.custom-mail-ai-live-head strong {
	display: block;
	font-size: 17px;
	line-height: 1.2;
}

.custom-mail-ai-live-head p {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.82);
}

.custom-mail-ai-live-close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.custom-mail-ai-live-messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 240px;
	overflow-y: auto;
	padding: 16px;
	background: #f8fafc;
}

.custom-mail-ai-live-message {
	display: grid;
	gap: 4px;
	max-width: 86%;
}

.custom-mail-ai-live-message p {
	margin: 0;
	border-radius: 16px;
	padding: 10px 12px;
	background: #fff;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
	white-space: pre-wrap;
}

.custom-mail-ai-live-message small {
	padding: 0 5px;
	font-size: 11px;
	color: #64748b;
}

.custom-mail-ai-live-message.is-visitor {
	align-self: flex-end;
}

.custom-mail-ai-live-message.is-visitor p {
	background: var(--cmai-live-accent);
	color: #fff;
}

.custom-mail-ai-live-message.is-admin p,
.custom-mail-ai-live-message.is-ai p {
	background: #fff;
	border: 1px solid #dbeafe;
}

.custom-mail-ai-live-message.is-ai p {
	background: #eef2ff;
	border-color: #c7d2fe;
}

.custom-mail-ai-live-message.is-system p {
	background: #f1f5f9;
	color: #475569;
	font-size: 13px;
}

.custom-mail-ai-live-form {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	padding: 14px;
	background: #fff;
	border-top: 1px solid #e2e8f0;
}

.custom-mail-ai-live-form textarea {
	width: 100%;
	min-height: 46px;
	max-height: 130px;
	resize: vertical;
	border: 1px solid #cbd5e1;
	border-radius: 14px;
	padding: 11px 12px;
	font: inherit;
	box-sizing: border-box;
}

.custom-mail-ai-live-form textarea:focus {
	outline: none;
	border-color: var(--cmai-live-accent);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.custom-mail-ai-live-form button {
	align-self: end;
	min-height: 46px;
	border: 0;
	border-radius: 14px;
	padding: 0 14px;
	background: var(--cmai-live-accent);
	color: #fff;
	font-weight: 800;
	cursor: pointer;
}

.custom-mail-ai-live-privacy {
	margin: 0;
	padding: 0 14px 14px;
	background: #fff;
	color: #64748b;
	font-size: 11px;
	line-height: 1.45;
}

@media (max-width: 480px) {
	.custom-mail-ai-live-widget,
	.custom-mail-ai-live-widget.is-left {
		right: 14px;
		left: 14px;
		bottom: 14px;
	}

	.custom-mail-ai-live-toggle {
		width: 100%;
		justify-content: center;
	}

	.custom-mail-ai-live-panel,
	.custom-mail-ai-live-widget.is-left .custom-mail-ai-live-panel {
		right: 0;
		left: 0;
		width: 100%;
	}
}

.custom-mail-ai-live-widget.has-new-message .custom-mail-ai-live-toggle {
	animation: customMailAILivePulse 1.1s ease-in-out infinite;
}

@keyframes customMailAILivePulse {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-3px); }
}

/* Záloha otvorenia živého chatu: panel ostáva ovládateľný aj pri posunutí skriptov optimalizérom. */
.custom-mail-ai-live-widget.is-open .custom-mail-ai-live-panel {
	display: grid !important;
}

.custom-mail-ai-live-widget:not(.is-open) .custom-mail-ai-live-panel {
	display: none;
}

/* 0.6.23 live chat notification UX */
.custom-mail-ai-live-toggle {
	position: relative;
}

.custom-mail-ai-live-toggle-badge,
.custom-mail-ai-live-unread-badge {
	position: absolute;
	top: -7px;
	right: -7px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	box-shadow: 0 8px 18px rgba(239, 68, 68, 0.32);
}

.custom-mail-ai-live-floating-notice {
	position: absolute;
	right: 0;
	bottom: 66px;
	width: min(320px, calc(100vw - 32px));
	padding: 12px 14px;
	border: 1px solid #bfdbfe;
	border-radius: 18px;
	background: #fff;
	color: #0f172a;
	font-size: 14px;
	font-weight: 750;
	box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
	transform: translateY(8px);
	opacity: 0;
	transition: opacity 0.22s ease, transform 0.22s ease;
	pointer-events: none;
}

.custom-mail-ai-live-widget.is-left .custom-mail-ai-live-floating-notice {
	right: auto;
	left: 0;
}

.custom-mail-ai-live-floating-notice.is-visible {
	transform: translateY(0);
	opacity: 1;
}

.custom-mail-ai-live-floating-notice.is-success {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #14532d;
}

.custom-mail-ai-live-floating-notice.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #7f1d1d;
}

.custom-mail-ai-live-floating-notice.is-info {
	border-color: #bfdbfe;
	background: #eff6ff;
	color: #1e3a8a;
}

.custom-mail-ai-live-sound {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
}

.custom-mail-ai-live-sound[aria-pressed="true"] {
	background: rgba(34, 197, 94, 0.88);
	border-color: rgba(34, 197, 94, 0.92);
}

.custom-mail-ai-live-widget.has-new-message .custom-mail-ai-live-toggle::after {
	content: '';
	position: absolute;
	inset: -8px;
	border: 2px solid rgba(239, 68, 68, 0.34);
	border-radius: 999px;
	animation: customMailAILiveRing 1.15s ease-in-out infinite;
}

@keyframes customMailAILiveRing {
	0% { opacity: 0.9; transform: scale(0.94); }
	100% { opacity: 0; transform: scale(1.2); }
}

/* 0.6.23 chat notification polish: badge, toast, sound action and sending state. */
.custom-mail-ai-live-toggle {
	position: relative;
}

.custom-mail-ai-live-toggle-badge,
.custom-mail-ai-live-unread-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 12px;
	font-weight: 900;
	line-height: 1;
	box-shadow: 0 10px 20px rgba(239, 68, 68, .25);
}

.custom-mail-ai-live-toggle-badge[hidden],
.custom-mail-ai-live-unread-badge[hidden] {
	display: none;
}

.custom-mail-ai-live-notice {
	margin: 12px 14px 0;
	padding: 10px 12px;
	border: 1px solid #dbeafe;
	border-radius: 14px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 13px;
	font-weight: 700;
}

.custom-mail-ai-live-notice.is-success {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.custom-mail-ai-live-notice.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.custom-mail-ai-live-status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
	font-size: 11px;
	font-weight: 800;
	color: rgba(255,255,255,.82);
}

.custom-mail-ai-live-head-actions {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.custom-mail-ai-live-sound {
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255,255,255,.25);
	border-radius: 999px;
	background: rgba(255,255,255,.12);
	color: #fff;
	cursor: pointer;
}

.custom-mail-ai-live-sound[aria-pressed="true"] {
	background: rgba(34, 197, 94, .34);
	border-color: rgba(187,247,208,.8);
}

.custom-mail-ai-live-widget.is-sending .custom-mail-ai-live-form button,
.custom-mail-ai-live-form button:disabled {
	opacity: .68;
	cursor: wait;
}

.custom-mail-ai-live-widget.has-new-message .custom-mail-ai-live-toggle::after {
	content: '';
	position: absolute;
	inset: -8px;
	border: 2px solid rgba(239, 68, 68, .45);
	border-radius: 999px;
	animation: customMailAILiveRing 1.4s ease-in-out infinite;
}

@keyframes customMailAILiveRing {
	0% { transform: scale(.92); opacity: .9; }
	100% { transform: scale(1.16); opacity: 0; }
}

/* 0.6.23 visitor-side notification polish. */
.custom-mail-ai-live-head-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.custom-mail-ai-live-sound {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
}

.custom-mail-ai-live-sound.is-on {
	background: rgba(34, 197, 94, .28);
	border-color: rgba(187, 247, 208, .55);
}

.custom-mail-ai-live-notice {
	margin: 10px 14px 0;
	padding: 10px 12px;
	border: 1px solid #bfdbfe;
	border-radius: 14px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 13px;
	font-weight: 700;
}

.custom-mail-ai-live-notice.is-success {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.custom-mail-ai-live-notice.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.custom-mail-ai-live-floating-notice {
	position: absolute;
	right: 0;
	bottom: 66px;
	width: min(320px, calc(100vw - 32px));
	padding: 12px 14px;
	border: 1px solid #bfdbfe;
	border-radius: 18px;
	background: #eff6ff;
	color: #1e3a8a;
	font-weight: 800;
	box-shadow: 0 18px 45px rgba(15, 23, 42, .22);
}

.custom-mail-ai-live-widget.is-left .custom-mail-ai-live-floating-notice {
	right: auto;
	left: 0;
}

.custom-mail-ai-live-floating-notice.is-success {
	border-color: #bbf7d0;
	background: #f0fdf4;
	color: #166534;
}

.custom-mail-ai-live-floating-notice.is-error {
	border-color: #fecaca;
	background: #fef2f2;
	color: #991b1b;
}

.custom-mail-ai-live-unread-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 900;
	line-height: 1;
}

.custom-mail-ai-live-widget.has-new-message .custom-mail-ai-live-toggle {
	box-shadow: 0 18px 45px rgba(239, 68, 68, .28), 0 0 0 7px rgba(239, 68, 68, .13);
}

@media (max-width: 480px) {
	.custom-mail-ai-live-floating-notice,
	.custom-mail-ai-live-widget.is-left .custom-mail-ai-live-floating-notice {
		right: 0;
		left: 0;
		width: auto;
	}
}
