/* Zoologic CRM – newsletter sign-up.
 * Follows the theme's section cards: 24px rounded card, tinted gradient with corner glow, pill badge,
 * Baloo 2 headings, pill inputs and buttons. Uses the theme's CSS variables with safe fallbacks. */

.zcrm-band { margin: 0; padding: 8px 0 20px; }

.zcrm-band-card {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #fff1e2 0%, #fff8f0 55%, #ffe9d2 100%);
	border: 1.5px solid #ffd3ad;
	border-radius: 24px;
	padding: 44px 50px;
	box-shadow: 0 12px 36px -10px rgba(255, 139, 64, 0.2), 0 4px 16px rgba(0, 0, 0, 0.02);
}

.zcrm-band-glow {
	position: absolute;
	top: -90px;
	right: -90px;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(255, 139, 64, 0.26) 0%, rgba(255, 139, 64, 0) 70%);
	border-radius: 50%;
	pointer-events: none;
}

.zcrm-band-inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
	gap: 56px;
	align-items: center;
}

/* Left: copy */
.zcrm-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 139, 64, 0.14);
	border: 1px solid rgba(255, 139, 64, 0.32);
	color: #b34a05;
	padding: 6px 14px;
	border-radius: 9999px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 16px;
}
.zcrm-badge-icon { display: flex; align-items: center; color: #e8590c; }

.zcrm-band-title {
	font-family: var(--font-headings, 'Baloo 2', cursive);
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--color-text, #131a2b);
	margin: 0 0 12px;
}
.zcrm-band-title span { color: #e8590c; }

.zcrm-band-desc {
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--color-text-secondary, #4d5566);
	margin: 0 0 20px;
	max-width: 460px;
}

.zcrm-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.zcrm-benefits li {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ffffff;
	border: 1px solid rgba(19, 26, 43, 0.06);
	border-radius: 12px;
	padding: 9px 14px;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--color-text, #131a2b);
	box-shadow: 0 1px 3px rgba(19, 26, 43, 0.04);
}
.zcrm-benefit-ico { display: inline-flex; color: #059669; flex: none; }

/* Right: form */
.zcrm-signup { width: 100%; }
.zcrm-title { margin: 0 0 6px; font-family: var(--font-headings, 'Baloo 2', cursive); }
.zcrm-lead { margin: 0 0 12px; color: var(--color-text-secondary, #4d5566); }

.zcrm-row { display: flex; gap: 10px; align-items: stretch; }

.zcrm-input {
	flex: 1;
	min-width: 0;
	height: 54px;
	padding: 0 22px;
	border: 1.5px solid #cbd5e1;
	border-radius: 9999px;
	background: #ffffff;
	font: inherit;
	font-size: 1rem;
	color: var(--color-text, #131a2b);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.zcrm-input::placeholder { color: #64748b; }
.zcrm-input:hover { border-color: #94a3b8; }
.zcrm-input:focus {
	outline: none;
	border-color: var(--color-action, #165dfc);
	box-shadow: 0 0 0 4px rgba(22, 93, 252, 0.16);
}

.zcrm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 54px;
	padding: 0 30px;
	border: 1px solid transparent;
	border-radius: 9999px;
	background: var(--color-action, #165dfc);
	color: #ffffff;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(22, 93, 252, 0.28);
	transition: all 0.2s ease;
}
.zcrm-btn:hover { background: var(--color-links, #0f3fbf); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22, 93, 252, 0.36); }
.zcrm-btn:focus-visible { outline: 3px solid var(--color-text, #131a2b); outline-offset: 3px; }
.zcrm-btn[disabled] { opacity: 0.65; cursor: progress; transform: none; }

/* Pet chips */
.zcrm-pets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 0; }
.zcrm-pets-label { font-size: 0.88rem; font-weight: 600; color: var(--color-text, #131a2b); margin-right: 4px; }
.zcrm-pets-label em { font-style: normal; font-weight: 400; color: var(--color-text-secondary, #4d5566); }

.zcrm-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	border-radius: 9999px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--color-text, #131a2b);
	cursor: pointer;
	user-select: none;
	transition: all 0.15s ease;
}
.zcrm-chip:hover { border-color: #94a3b8; }
.zcrm-chip-ico { display: inline-flex; align-items: center; color: var(--color-action, #165dfc); }
.zcrm-chip:has(input[value="kot"]) .zcrm-chip-ico { color: #e8590c; }
.zcrm-chip input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.zcrm-chip.is-on,
.zcrm-chip:has(input:checked) { border-color: var(--color-action, #165dfc); background: #eaf1ff; color: var(--color-links, #0f3fbf); }
.zcrm-chip:has(input:focus-visible) { outline: 3px solid var(--color-action, #165dfc); outline-offset: 2px; }
/* The visually hidden checkbox must not draw the theme's black ring on top of the chip's own focus ring. */
.zcrm-chip input:focus,
.zcrm-chip input:focus-visible { outline: none; }
.zcrm-chip.is-focus { outline: 3px solid var(--color-action, #165dfc); outline-offset: 2px; }

/* Consent */
.zcrm-consent { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0 0; cursor: pointer; }
.zcrm-consent input {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 20px;
	height: 20px;
	margin: 1px 0 0;
	border: 1.5px solid #94a3b8;
	border-radius: 6px;
	background: #ffffff;
	display: inline-grid;
	place-content: center;
	cursor: pointer;
	transition: all 0.15s ease;
}
.zcrm-consent input::before {
	content: '';
	width: 10px;
	height: 6px;
	border-left: 2.4px solid #ffffff;
	border-bottom: 2.4px solid #ffffff;
	transform: rotate(-45deg) scale(0);
	margin-top: -2px;
	transition: transform 0.12s ease;
}
.zcrm-consent input:checked { background: var(--color-action, #165dfc); border-color: var(--color-action, #165dfc); }
.zcrm-consent input:checked::before { transform: rotate(-45deg) scale(1); }
.zcrm-consent input:focus-visible { outline: 3px solid var(--color-action, #165dfc); outline-offset: 2px; }
.zcrm-consent-text { font-size: 0.8rem; line-height: 1.55; color: var(--color-text-secondary, #4d5566); }
.zcrm-consent-text a { color: var(--color-links, #0f3fbf); text-decoration: underline; }

/* Messages */
.zcrm-msg { margin: 14px 0 0; font-size: 0.9rem; font-weight: 600; border-radius: 12px; }
.zcrm-msg:empty { display: none; }
.zcrm-msg.is-ok,
.zcrm-msg.is-err { padding: 11px 16px; }
.zcrm-msg.is-ok { background: #e3f6ea; color: #0b6b3a; border: 1px solid #b6ebd1; }
.zcrm-msg.is-err { background: #fde7e5; color: #a1271d; border: 1px solid #f5c2bd; }

.zcrm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tablet & mobile */
@media (max-width: 900px) {
	.zcrm-band-card { padding: 34px 28px; }
	.zcrm-band-inner { grid-template-columns: 1fr; gap: 28px; }
	.zcrm-band-title { font-size: 1.7rem; }
	.zcrm-benefits { max-width: none; }
}
@media (max-width: 520px) {
	.zcrm-band { padding: 4px 0 12px; }
	.zcrm-band-card { padding: 26px 18px; border-radius: 20px; }
	.zcrm-band-title { font-size: 1.5rem; }
	.zcrm-band-desc { font-size: 1rem; }
	.zcrm-row { flex-direction: column; }
	.zcrm-input { flex: none; width: 100%; }
	.zcrm-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.zcrm-btn, .zcrm-input, .zcrm-chip, .zcrm-consent input { transition: none; }
}

/* ==========================================================================
   Newsletter pop-up
   ========================================================================== */
html.zcrm-popup-open { overflow: hidden; }

.zcrm-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.zcrm-popup[hidden] { display: none; }

.zcrm-popup-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(19, 26, 43, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.zcrm-popup-box {
	position: relative;
	overflow: hidden;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: linear-gradient(135deg, #fff1e2 0%, #fff8f0 55%, #ffe9d2 100%);
	border: 1.5px solid #ffd3ad;
	border-radius: 24px;
	padding: 40px 38px 32px;
	box-shadow: 0 30px 80px -20px rgba(19, 26, 43, 0.45), 0 8px 24px rgba(0, 0, 0, 0.08);
	opacity: 0;
	transform: translateY(14px) scale(0.98);
	transition: opacity 0.22s ease, transform 0.22s ease;
	outline: none;
}

/* The dialog box itself is only focused programmatically (so screen readers land in it). The theme's global
   :focus-visible rule would draw a thick black ring around the whole card, so it is switched off here with a
   selector that wins regardless of stylesheet order. Every real control keeps its own visible focus ring. */
.zcrm-popup .zcrm-popup-box:focus,
.zcrm-popup .zcrm-popup-box:focus-visible {
	outline: none;
}

.zcrm-popup.is-open .zcrm-popup-backdrop { opacity: 1; }
.zcrm-popup.is-open .zcrm-popup-box { opacity: 1; transform: none; }

.zcrm-popup-body { position: relative; z-index: 1; }

.zcrm-popup-close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(19, 26, 43, 0.1);
	border-radius: 50%;
	background: #ffffff;
	color: var(--color-text, #131a2b);
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
	transition: all 0.15s ease;
}
.zcrm-popup-close:hover { background: #f1f5f9; transform: rotate(90deg); }
.zcrm-popup-close:focus-visible { outline: 3px solid var(--color-action, #165dfc); outline-offset: 2px; }

.zcrm-popup-title {
	font-family: var(--font-headings, 'Baloo 2', cursive);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--color-text, #131a2b);
	margin: 0 0 10px;
	padding-right: 36px;
}

.zcrm-popup-text {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text-secondary, #4d5566);
	margin: 0 0 20px;
}

.zcrm-popup .zcrm-signup { margin: 0; }

@media (max-width: 520px) {
	.zcrm-popup { align-items: flex-end; padding: 10px; }
	.zcrm-popup-box { padding: 30px 20px 22px; border-radius: 22px; max-height: calc(100vh - 20px); }
	.zcrm-popup-title { font-size: 1.45rem; }
}
@media (prefers-reduced-motion: reduce) {
	.zcrm-popup-backdrop, .zcrm-popup-box, .zcrm-popup-close { transition: none; }
	.zcrm-popup-box { transform: none; }
}
