/* ================================================================
   Book Free Demo — Premium SaaS Modal  (demo-modal.css)
   Enterprise CRM aesthetic · Doso brand (blue #2563EB / orange CTA)
   Rebuilt from scratch — HubSpot / Monday / Linear quality target.
   ================================================================ */

/* ---------- Overlay ---------- */
.dm-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	overflow-y: auto;
	background: rgba(15, 23, 42, 0.55);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.dm-overlay:not([hidden]) { opacity: 1; }
.dm-overlay[hidden]       { display: none !important; }

/* ---------- Modal shell ---------- */
.dm-modal {
	position: relative;
	width: 100%;
	max-width: 920px;
	max-height: calc(100vh - 80px);
	display: grid;
	grid-template-columns: 45% 55%;
	background: #fff;
	border-radius: 24px;
	overflow: hidden;
	box-shadow:
		0 2px 8px rgba(15, 23, 42, 0.06),
		0 32px 80px -12px rgba(15, 23, 42, 0.35);
	transform: translateY(24px) scale(0.97);
	opacity: 0;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.dm-overlay:not([hidden]) .dm-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* ---------- Close button ---------- */
.dm-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 20;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #475569;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
	transition: background 0.18s, color 0.18s, transform 0.18s;
}

.dm-close:hover {
	background: #fff;
	color: #0f172a;
	transform: rotate(90deg);
}

/* ================================================================
   LEFT · MARKETING PANEL
   ================================================================ */
.dm-left {
	position: relative;
	min-width: 0;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: safe center;
	padding: 30px 32px;
	background: linear-gradient(165deg, #eaf2ff 0%, #f5f9ff 48%, #ffffff 100%);
	border-right: 1px solid #e8eef7;
}

/* Decorative background layer */
.dm-left__bg { position: absolute; inset: 0; pointer-events: none; }

.dm-blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(8px);
	opacity: 0.5;
}

.dm-blob--1 {
	width: 240px; height: 240px;
	right: -90px; top: -70px;
	background: radial-gradient(circle, rgba(37, 99, 235, 0.18), transparent 70%);
}

.dm-blob--2 {
	width: 200px; height: 200px;
	left: -70px; bottom: 40px;
	background: radial-gradient(circle, rgba(6, 182, 212, 0.16), transparent 70%);
}

.dm-grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(37, 99, 235, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(37, 99, 235, 0.04) 1px, transparent 1px);
	background-size: 26px 26px;
	-webkit-mask-image: radial-gradient(circle at 30% 20%, #000, transparent 75%);
	mask-image: radial-gradient(circle at 30% 20%, #000, transparent 75%);
}

.dm-left__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
}

/* Logo */
.dm-logo { margin-bottom: 22px; }
.dm-logo__img { max-height: 40px; width: auto; display: block; }
.dm-logo__text {
	font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
	font-size: 1.55rem;
	font-weight: 800;
	color: #2563eb;
	letter-spacing: -0.03em;
}

/* Green success badge */
.dm-badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	align-self: flex-start;
	padding: 7px 14px;
	margin-bottom: 18px;
	font-size: 12.5px;
	font-weight: 600;
	color: #047857;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	border-radius: 100px;
	letter-spacing: 0.01em;
}
.dm-badge svg { color: #10b981; flex-shrink: 0; }

/* Headline */
.dm-heading {
	font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
	font-size: 2rem;
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.02em;
	color: #0f172a;
	margin: 0 0 14px;
}
.dm-heading__accent {
	color: #2563eb;
	position: relative;
}

/* Description */
.dm-desc {
	font-size: 14.5px;
	line-height: 1.65;
	color: #475569;
	margin: 0 0 24px;
	max-width: 42ch;
}
.dm-desc__hi { color: #1d4ed8; font-weight: 700; }

/* Divider */
.dm-divider {
	border: none;
	height: 1px;
	background: linear-gradient(90deg, #d8e3f5, transparent);
	margin: 0 0 22px;
}

/* Social proof — avatars + count */
.dm-proof {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
}

.dm-avatars { display: flex; }
.dm-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	margin-left: -10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--a, #2563eb);
	border: 2.5px solid #fff;
	box-shadow: 0 2px 5px rgba(15, 23, 42, 0.12);
}
.dm-avatar:first-child { margin-left: 0; }
.dm-avatar--more {
	background: #1e293b;
	font-size: 15px;
}

.dm-proof__text {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.4;
	color: #475569;
}
.dm-proof__text strong {
	display: block;
	color: #0f172a;
	font-weight: 700;
	font-size: 14.5px;
}

/* Feature checklist */
.dm-features {
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
}
.dm-features li {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13.5px;
	font-weight: 500;
	color: #1e293b;
}
.dm-features svg { flex-shrink: 0; }

/* Review cards */
.dm-reviews {
	display: flex;
	gap: 10px;
	margin-top: auto;
}
.dm-review {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid #e3ebf6;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
	transition: transform 0.18s, box-shadow 0.18s;
}
.dm-review:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}
.dm-review__stars {
	font-size: 11px;
	color: #f59e0b;
	letter-spacing: 1px;
	line-height: 1;
}
.dm-review__meta {
	font-size: 12px;
	color: #64748b;
	white-space: nowrap;
}
.dm-review__meta strong {
	color: #0f172a;
	font-weight: 700;
	margin-right: 3px;
}

/* ================================================================
   RIGHT · FORM PANEL
   ================================================================ */
.dm-right {
	min-width: 0;
	background: #fff;
	padding: 30px 36px 28px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	justify-content: safe center;
}

.dm-right__inner { width: 100%; }

.dm-form-head { margin-bottom: 14px; }
.dm-form-title {
	font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #0f172a;
	margin: 0 0 6px;
	line-height: 1.25;
}
.dm-form-sub {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.55;
}

/* ---------- CF7 reset ---------- */
.dm-form-wrap .wpcf7,
.dm-form-wrap .wpcf7-form { margin: 0; padding: 0; }

/* Each CF7 <p> = one field row */
.dm-form-wrap .wpcf7-form > p { margin: 0 0 10px; }
.dm-form-wrap .wpcf7-form > p:last-of-type { margin-bottom: 0; }

/* Labels */
.dm-form-wrap label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 6px;
	letter-spacing: 0.01em;
}

.dm-form-wrap .wpcf7-form-control-wrap { display: block; }

/* ---------- Inputs ---------- */
.dm-form-wrap input[type="text"],
.dm-form-wrap input[type="email"],
.dm-form-wrap input[type="tel"],
.dm-form-wrap input[type="url"],
.dm-form-wrap textarea {
	width: 100%;
	box-sizing: border-box;
	height: 44px;
	padding: 0 16px 0 46px;
	font-size: 14.5px;
	font-family: inherit;
	color: #0f172a;
	background-color: #f8fafc;
	background-repeat: no-repeat;
	background-position: 16px center;
	background-size: 18px 18px;
	border: 1.5px solid #e2e8f0;
	border-radius: 14px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
	-webkit-appearance: none;
}

.dm-form-wrap textarea {
	height: 82px;
	min-height: 82px;
	max-height: 160px;
	padding: 11px 16px 11px 46px;
	background-position: 16px 13px;
	resize: vertical;
	line-height: 1.45;
}

.dm-form-wrap input::placeholder,
.dm-form-wrap textarea::placeholder { color: #94a3b8; }

/* Field icons (inside input, by field name) */
.dm-form-wrap input[name="your-name"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.dm-form-wrap input[name="your-email"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='16' rx='2'/%3E%3Cpath d='m22 7-10 5L2 7'/%3E%3C/svg%3E");
}
.dm-form-wrap input[name="your-subject"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41 13.42 20.6a2 2 0 0 1-2.83 0L2 12V2h10z'/%3E%3Cline x1='7' y1='7' x2='7.01' y2='7'/%3E%3C/svg%3E");
}
.dm-form-wrap textarea[name="your-message"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}

/* Premium focus state */
.dm-form-wrap input[type="text"]:focus,
.dm-form-wrap input[type="email"]:focus,
.dm-form-wrap input[type="tel"]:focus,
.dm-form-wrap input[type="url"]:focus,
.dm-form-wrap textarea:focus {
	border-color: #2563eb;
	background-color: #fff;
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* ---------- CTA button ---------- */
.dm-form-wrap input[type="submit"],
.dm-form-wrap .wpcf7-submit {
	display: block;
	width: 100%;
	height: 46px;
	margin-top: 2px;
	border: none;
	border-radius: 14px;
	font-size: 16px;
	font-weight: 700;
	font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
	letter-spacing: 0.01em;
	color: #fff;
	cursor: pointer;
	background: linear-gradient(135deg, #fb923c 0%, #f97316 50%, #ea580c 100%);
	box-shadow: 0 8px 20px -6px rgba(249, 115, 22, 0.55);
	transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.dm-form-wrap input[type="submit"]:hover,
.dm-form-wrap .wpcf7-submit:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 28px -8px rgba(249, 115, 22, 0.6);
	filter: brightness(1.04);
}
.dm-form-wrap input[type="submit"]:active,
.dm-form-wrap .wpcf7-submit:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px -6px rgba(249, 115, 22, 0.5);
}

/* Spinner */
.dm-form-wrap .wpcf7-spinner {
	margin: 0 auto;
	display: block;
}

/* ---------- Validation: compact red helper text only ---------- */
.dm-form-wrap .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 500;
	color: #dc2626;
}
.dm-form-wrap input.wpcf7-not-valid,
.dm-form-wrap textarea.wpcf7-not-valid {
	border-color: #fca5a5;
	background-color: #fef2f2;
}

/* Hide CF7's big response box by default … */
.dm-form-wrap .wpcf7-response-output {
	display: none;
	margin: 16px 0 0;
	padding: 11px 14px;
	border: none;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.45;
}
/* … only show the meaningful mail-sent outcomes, as a slim toast */
.dm-form-wrap .wpcf7-response-output.wpcf7-mail-sent-ok {
	display: block;
	background: #ecfdf5;
	color: #047857;
	border-left: 3px solid #10b981;
}
.dm-form-wrap .wpcf7-response-output.wpcf7-mail-sent-ng,
.dm-form-wrap .wpcf7-response-output.wpcf7-aborted {
	display: block;
	background: #fef2f2;
	color: #b91c1c;
	border-left: 3px solid #ef4444;
}

/* Privacy note */
.dm-form-note {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 18px 0 0;
	font-size: 12px;
	color: #94a3b8;
	line-height: 1.4;
}
.dm-form-note svg { flex-shrink: 0; color: #94a3b8; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet — stack columns */
@media (max-width: 920px) {
	.dm-modal {
		grid-template-columns: 1fr;
		max-width: 560px;
	}
	.dm-left {
		padding: 40px 36px 32px;
		border-right: none;
		border-bottom: 1px solid #e8eef7;
	}
	.dm-heading { font-size: 1.7rem; }
	.dm-reviews { margin-top: 24px; }
	.dm-right { padding: 36px 36px 32px; }
}

/* Mobile */
@media (max-width: 560px) {
	.dm-overlay { padding: 0; align-items: stretch; }
	.dm-modal {
		border-radius: 0;
		min-height: 100%;
	}
	.dm-left { padding: 32px 22px 26px; }
	.dm-right { padding: 28px 22px 30px; }

	.dm-heading { font-size: 1.5rem; }
	.dm-desc { font-size: 13.5px; }

	.dm-features { grid-template-columns: 1fr; gap: 10px; }

	.dm-reviews {
		flex-wrap: wrap;
	}
	.dm-review { flex: 1 1 calc(33.33% - 8px); min-width: 0; }

	.dm-form-title { font-size: 1.4rem; }
	.dm-form-wrap input[type="text"],
	.dm-form-wrap input[type="email"],
	.dm-form-wrap input[type="tel"],
	.dm-form-wrap textarea { height: 52px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.dm-overlay,
	.dm-modal,
	.dm-close,
	.dm-review,
	.dm-form-wrap input[type="submit"],
	.dm-form-wrap .wpcf7-submit {
		transition: none;
	}
}
