/* =====================================================================
   WC DG Price Calculator - Frontend v3.1
   Concept: numbered steps + live "blueprint" window preview + price ticket
   Everything is scoped to .wcdg-calculator-wrap
   ===================================================================== */

.wcdg-calculator-wrap {
	--wcdg-red: #e31e24;
	--wcdg-red-d: #bf1419;
	--wcdg-navy: #12294d;
	--wcdg-navy-2: #0c1d38;
	--wcdg-ink: #1d2433;
	--wcdg-mute: #5b6678;
	--wcdg-line: #e4e9f1;
	--wcdg-soft: #f3f6fa;
	--wcdg-pink: #fff1f2;
	--wcdg-pink-line: #fbc7ca;
	--wcdg-amber: #8a5a00;
	--wcdg-amber-line: #f3d58a;

	width: 100%;
	max-width: 980px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--wcdg-ink);
	line-height: 1.9;
	direction: rtl;
	text-align: right;
}

.wcdg-calculator-wrap *,
.wcdg-calculator-wrap *::before,
.wcdg-calculator-wrap *::after { box-sizing: border-box; }

.wcdg-calculator-wrap h2,
.wcdg-calculator-wrap h3,
.wcdg-calculator-wrap h4,
.wcdg-calculator-wrap p { margin: 0; padding: 0; }

/* ---------- Card ---------- */
.wcdg-card {
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--wcdg-line);
	border-radius: 26px;
	box-shadow: 0 20px 50px rgba(18, 41, 77, 0.10);
}

/* ---------- Header ---------- */
.wcdg-head { padding: 28px 32px 22px; }

.wcdg-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--wcdg-red-d);
	letter-spacing: .02em;
}
.wcdg-badge i { display: block; width: 26px; height: 3px; border-radius: 3px; background: var(--wcdg-red); }

.wcdg-title {
	font-size: clamp(22px, 3.6vw, 34px);
	line-height: 1.6;
	font-weight: 600;
	color: var(--wcdg-navy);
}
.wcdg-title em { font-style: normal; font-weight: 800; color: var(--wcdg-red); }

.wcdg-subtitle { margin-top: 6px; color: var(--wcdg-mute); font-size: 15px; }

/* ---------- Main split ---------- */
.wcdg-main {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	border-top: 1px solid var(--wcdg-line);
}

.wcdg-form { padding: 26px 32px 30px; margin: 0; min-width: 0; }

/* ---------- Steps ---------- */
.wcdg-steps { counter-reset: wcdg-step; display: flex; flex-direction: column; gap: 18px; }

.wcdg-calculator-wrap .wcdg-field { margin: 0; min-width: 0; }

.wcdg-calculator-wrap .wcdg-step > label,
.wcdg-calculator-wrap .wcdg-step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--wcdg-navy);
}

.wcdg-calculator-wrap .wcdg-step > label::before,
.wcdg-calculator-wrap .wcdg-step-title::before {
	counter-increment: wcdg-step;
	content: counter(wcdg-step);
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 8px;
	background: var(--wcdg-navy);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcdg-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.wcdg-calculator-wrap .wcdg-pair .wcdg-field label {
	display: block;
	margin: 0 0 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wcdg-mute);
}

/* inputs */
.wcdg-calculator-wrap .wcdg-field input,
.wcdg-calculator-wrap .wcdg-field select {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	background-color: var(--wcdg-soft);
	border: 1.5px solid transparent;
	border-radius: 12px;
	font-family: inherit;
	font-size: 15px;
	color: var(--wcdg-ink);
	box-shadow: none;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}

.wcdg-calculator-wrap .wcdg-field input:focus,
.wcdg-calculator-wrap .wcdg-field select:focus {
	outline: none;
	background-color: #fff;
	border-color: var(--wcdg-navy);
	box-shadow: 0 0 0 4px rgba(18, 41, 77, .10);
}

/* select: native arrow removed, tiny CSS chevron (theme-proof) */
.wcdg-select { position: relative; display: block; min-width: 0; }

.wcdg-calculator-wrap .wcdg-select select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: none !important;
	padding-left: 38px;
	cursor: pointer;
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
}

.wcdg-select::after {
	content: "";
	position: absolute;
	left: 17px;
	top: 50%;
	width: 7px;
	height: 7px;
	border: solid var(--wcdg-navy);
	border-width: 0 2px 2px 0;
	border-radius: 1px;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
	transition: transform .2s;
}
.wcdg-select:focus-within::after { transform: translateY(-30%) rotate(225deg); }
.wcdg-select:has(select:disabled)::after { opacity: .35; }
.wcdg-calculator-wrap .wcdg-select select:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Buttons ---------- */
.wcdg-calculator-wrap .wcdg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	height: 52px;
	padding: 0 24px;
	border: 0;
	border-radius: 14px;
	font-family: inherit;
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.4;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, filter .2s;
}
.wcdg-calculator-wrap .wcdg-btn:hover { transform: translateY(-2px); color: #fff; filter: brightness(1.07); }
.wcdg-calculator-wrap .wcdg-btn:disabled { opacity: .65; cursor: wait; transform: none; }

.wcdg-calculator-wrap .wcdg-btn-primary {
	margin-top: 22px;
	background: linear-gradient(135deg, var(--wcdg-red), var(--wcdg-red-d));
	box-shadow: 0 12px 24px rgba(227, 30, 36, .28);
}
.wcdg-calculator-wrap .wcdg-btn-success {
	margin-top: 6px;
	background: linear-gradient(135deg, #1b3f75, var(--wcdg-navy));
	box-shadow: 0 12px 24px rgba(18, 41, 77, .25);
}

.wcdg-calculator-wrap .wcdg-contract-inline-note {
	margin: 0;
	padding: 12px 16px;
	border: 1px dashed var(--wcdg-amber-line);
	border-radius: 12px;
	color: var(--wcdg-amber);
	font-size: 13.5px;
}

/* ---------- Blueprint preview ---------- */
.wcdg-blueprint {
	position: relative;
	min-width: 0;
	padding: 24px 24px 22px;
	color: #fff;
	background-color: var(--wcdg-navy-2);
	background-image:
		linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
		linear-gradient(160deg, #15325d 0%, var(--wcdg-navy-2) 100%);
	background-size: 22px 22px, 22px 22px, 100% 100%;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.wcdg-bp-tag {
	align-self: flex-start;
	padding: 3px 12px;
	border-radius: 6px;
	background: var(--wcdg-red);
	font-size: 12px;
	font-weight: 700;
}

.wcdg-bp-svg { width: 100%; height: auto; max-height: 300px; display: block; }
.wcdg-bp-svg text { font-family: inherit; fill: #fff; font-size: 13px; font-weight: 600; }

.wcdg-bp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.wcdg-chip {
	display: inline-flex;
	gap: 6px;
	max-width: 100%;
	padding: 4px 12px;
	background: rgba(255,255,255,.10);
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 999px;
	font-size: 12.5px;
	line-height: 1.8;
}
.wcdg-chip small { opacity: .65; font-size: inherit; }
.wcdg-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Result ---------- */
.wcdg-calculator-wrap .wcdg-result-box {
	margin: 0;
	padding: 26px 32px 32px;
	background: #fff;
	border: 0;
	border-top: 1px solid var(--wcdg-line);
	border-radius: 0;
}

.wcdg-ticket {
	position: relative;
	padding: 20px 24px;
	background: var(--wcdg-navy);
	border-radius: 20px;
	color: #fff;
	border-right: 6px solid var(--wcdg-red);
}

.wcdg-result-head { display: flex; align-items: center; gap: 14px; }

.wcdg-result-icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: rgba(255,255,255,.12);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 800;
}

.wcdg-calculator-wrap .wcdg-result-box h3 {
	color: #fff;
	font-size: clamp(17px, 2.4vw, 22px);
	font-weight: 500;
	line-height: 1.7;
}
.wcdg-calculator-wrap .wcdg-result-box h3 #wcdg-final-price {
	margin: 0 6px;
	font-size: 1.45em;
	font-weight: 800;
	color: #fff;
}
.wcdg-calculator-wrap .wcdg-result-box.wcdg-result-empty #wcdg-final-price { opacity: .4; }
.wcdg-calculator-wrap .wcdg-contract-price { color: #ffd166; font-weight: 800; }

.wcdg-calculator-wrap .wcdg-result-summary {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px dashed rgba(255,255,255,.25);
	font-size: 14px;
	color: rgba(255,255,255,.78);
}

.wcdg-calculator-wrap .wcdg-contract-note {
	margin-top: 10px;
	padding: 10px 14px;
	border: 1px dashed #ffd166;
	border-radius: 12px;
	color: #ffe29a;
	font-size: 13.5px;
}

.wcdg-calculator-wrap .wcdg-result-note {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 14px;
	padding: 12px 18px;
	background: var(--wcdg-pink);
	border: 1px solid var(--wcdg-pink-line);
	border-radius: 16px;
	color: var(--wcdg-navy);
	font-size: 14px;
	font-weight: 700;
}
.wcdg-alert-icon {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	background: var(--wcdg-red);
	clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
}
.wcdg-alert-sep { flex: 0 0 2px; align-self: stretch; background: var(--wcdg-navy); opacity: .5; border-radius: 2px; }

/* ---------- Lead ---------- */
.wcdg-calculator-wrap .wcdg-lead-form {
	margin-top: 20px;
	padding: 22px;
	background: var(--wcdg-soft);
	border: 0;
	border-radius: 20px;
}
.wcdg-calculator-wrap .wcdg-lead-form h4 { margin-bottom: 14px; font-size: 17px; font-weight: 800; color: var(--wcdg-navy); }
.wcdg-lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.wcdg-calculator-wrap .wcdg-lead-grid .wcdg-field label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--wcdg-mute); }
.wcdg-calculator-wrap .wcdg-lead-form .wcdg-field input { background-color: #fff; border-color: var(--wcdg-line); }
.wcdg-calculator-wrap .wcdg-lead-message { margin-top: 10px; font-size: 14px; font-weight: 600; min-height: 1.4em; }

/* ---------- Contact ---------- */
.wcdg-calculator-wrap .wcdg-contact-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; padding: 0; border: 0; }
.wcdg-calculator-wrap .wcdg-contact-buttons > p { font-size: 14px; font-weight: 700; color: var(--wcdg-navy); }

.wcdg-calculator-wrap .wcdg-citem {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 16px;
	background: #fff;
	border: 1px solid var(--wcdg-line);
	border-radius: 16px;
	color: var(--wcdg-ink);
	text-decoration: none;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.wcdg-calculator-wrap .wcdg-citem:hover { transform: translateX(-4px); border-color: var(--wcdg-navy); box-shadow: 0 12px 26px rgba(18,41,77,.12); color: var(--wcdg-ink); }

.wcdg-citem-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.wcdg-citem-icon svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wcdg-citem-bale .wcdg-citem-icon { background: linear-gradient(135deg, #3bb8f5, #1d92d0); }
.wcdg-citem-eitaa .wcdg-citem-icon { background: linear-gradient(135deg, #f5974a, #e5731a); }
.wcdg-citem-whatsapp .wcdg-citem-icon { background: linear-gradient(135deg, #3ddc84, #1faa57); }
.wcdg-citem-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wcdg-citem-text b { font-size: 15.5px; font-weight: 800; color: var(--wcdg-navy); line-height: 1.6; }
.wcdg-citem-text em { font-style: normal; font-size: 13px; color: var(--wcdg-mute); }
.wcdg-citem-arrow { font-size: 24px; line-height: 1; color: var(--wcdg-red); }

/* ---------- Tablet / Mobile ---------- */
@media (max-width: 820px) {
	.wcdg-main { grid-template-columns: minmax(0, 1fr); }
	.wcdg-blueprint { order: -1; padding: 18px 16px 16px; }
	.wcdg-bp-svg { max-height: 220px; }
}

@media (max-width: 640px) {
	.wcdg-card { border-radius: 20px; }
	.wcdg-head { padding: 22px 18px 18px; }
	.wcdg-form { padding: 22px 18px 24px; }
	.wcdg-calculator-wrap .wcdg-result-box { padding: 22px 18px 26px; }
	.wcdg-ticket { padding: 16px 16px; }
	.wcdg-lead-grid { grid-template-columns: minmax(0, 1fr); }
	.wcdg-calculator-wrap .wcdg-lead-form { padding: 16px 14px; }
	.wcdg-calculator-wrap .wcdg-result-note { gap: 10px; padding: 12px; }
	.wcdg-calculator-wrap .wcdg-field input,
	.wcdg-calculator-wrap .wcdg-field select { font-size: 16px; } /* prevents iOS zoom */
}

@media (prefers-reduced-motion: reduce) { .wcdg-calculator-wrap * { transition: none !important; } }
