/* CWD Quote Calculator – uses the Avada global palette where available. */
.cwdqc {
	--cwdqc-accent: var(--awb-color5, #c4381d);
	--cwdqc-accent-dark: var(--awb-color6, #792121);
	--cwdqc-ink: var(--awb-color8, #050505);
	--cwdqc-muted: var(--awb-color4, #656a70);
	--cwdqc-line: var(--awb-color3, #d1d1d1);
	--cwdqc-soft: var(--awb-color2, #f4f4f4);
	--cwdqc-card: var(--awb-color1, #ffffff);
	--cwdqc-radius: 10px;
	font-size: 16px;
	line-height: 1.45;
	text-align: left;
	container-type: inline-size;
}
.cwdqc *, .cwdqc *::before, .cwdqc *::after { box-sizing: border-box; }
.cwdqc [hidden] { display: none !important; }

/* Avada colours headings and links with #wrapper-level selectors, so pin ours. */
.cwdqc .cwdqc-card, .cwdqc .cwdqc-summary, .cwdqc .cwdqc-card h3, .cwdqc .cwdqc-summary h3, .cwdqc label, .cwdqc strong { color: var(--cwdqc-ink) !important; }
/* The optional title sits outside the cards, so it takes the surrounding section's text colour. */
.cwdqc .cwdqc-heading { color: inherit !important; margin: 0; }

/* Two columns when the calculator itself has room, whatever column it sits in. */
.cwdqc-grid { display: grid; gap: 24px; align-items: start; }
@container (min-width: 860px) {
	.cwdqc-grid { grid-template-columns: minmax(0, 1fr) 360px; }
	.cwdqc-side { position: sticky; top: 120px; }
	/* An open enquiry form makes the panel taller than the screen, so let it scroll. */
	.cwdqc-side:has(.cwdqc-form:not([hidden])) { position: static; }
}
.cwdqc-main { display: grid; gap: 20px; }

/* Cards */
.cwdqc-card, .cwdqc-summary {
	background: var(--cwdqc-card);
	color: var(--cwdqc-ink);
	border-radius: var(--cwdqc-radius);
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.cwdqc .cwdqc-card__title, .cwdqc .cwdqc-summary__title {
	margin: 0 0 4px;
	font-size: 21px;
	line-height: 1.25;
	color: var(--cwdqc-ink);
}
.cwdqc-card__sub { margin: 0 0 16px; color: var(--cwdqc-muted); font-size: 15px; }
.cwdqc-card__title + .cwdqc-options, .cwdqc-card__title + .cwdqc-plans, .cwdqc-card__title + .cwdqc-incl { margin-top: 16px; }

/* Pages picker */
.cwdqc-pages { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 8px 0 16px; }
.cwdqc-pages__display { display: grid; justify-items: center; min-width: 140px; }
.cwdqc-pages__num { font-size: 52px; font-weight: 700; line-height: 1; }
.cwdqc-pages__word { color: var(--cwdqc-muted); font-size: 15px; }
.cwdqc-pages__price { margin-top: 6px; font-weight: 700; color: var(--cwdqc-accent); font-size: 20px; }
.cwdqc .cwdqc-round {
	width: 48px; height: 48px; border-radius: 50%;
	border: 2px solid var(--cwdqc-ink); background: transparent; color: var(--cwdqc-ink);
	font-size: 24px; line-height: 1; cursor: pointer; padding: 0;
}
.cwdqc .cwdqc-round:hover, .cwdqc .cwdqc-round:focus-visible { background: var(--cwdqc-ink); color: #fff; }
.cwdqc input[type=range] { width: 100%; accent-color: var(--cwdqc-accent); margin: 0; }
.cwdqc-hint { margin: 12px 0 0; font-size: 15px; }
.cwdqc-hint a { color: var(--cwdqc-accent); text-decoration: underline; }

/* Option cards */
.cwdqc-options { display: grid; gap: 10px; }
.cwdqc-option {
	border: 1px solid var(--cwdqc-line);
	border-radius: 8px;
	transition: border-color .15s, background-color .15s;
}
.cwdqc-card > .cwdqc-option + .cwdqc-option, .cwdqc-card > .cwdqc-plans + .cwdqc-option, .cwdqc-card > .cwdqc-option + .cwdqc-plans { margin-top: 10px; }
.cwdqc-option.is-on { border-color: var(--cwdqc-accent); background: #fdf6f4; }
.cwdqc-option--plain.is-on { border-color: var(--cwdqc-line); background: transparent; }
.cwdqc-option__head { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; cursor: pointer; margin: 0; }
.cwdqc-option__head input { margin: 3px 0 0; width: 20px; height: 20px; flex: none; accent-color: var(--cwdqc-accent); cursor: pointer; }
.cwdqc-option__text { flex: 1; display: grid; gap: 2px; }
.cwdqc-option__desc { color: var(--cwdqc-muted); font-size: 14px; }
.cwdqc-option__price { font-weight: 700; white-space: nowrap; font-size: 15px; }

/* Stepper */
.cwdqc-stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px dashed var(--cwdqc-line); flex-wrap: wrap; }
.cwdqc-option--plain .cwdqc-stepper { border-top: 0; }
.cwdqc-stepper__label { font-size: 15px; margin: 0; }
.cwdqc-stepper__ctrl { display: flex; align-items: stretch; border: 1px solid var(--cwdqc-line); border-radius: 6px; overflow: hidden; background: #fff; }
.cwdqc .cwdqc-stepper__ctrl button { width: 40px; border: 0; background: var(--cwdqc-soft); color: var(--cwdqc-ink); font-size: 20px; line-height: 1; cursor: pointer; padding: 0; }
.cwdqc .cwdqc-stepper__ctrl button:hover { background: var(--cwdqc-line); }
.cwdqc .cwdqc-stepper__ctrl input {
	width: 56px; border: 0; text-align: center; font-size: 16px; padding: 8px 0; margin: 0; height: auto;
	background: #fff; color: var(--cwdqc-ink); -moz-appearance: textfield; appearance: textfield;
}
.cwdqc .cwdqc-stepper__ctrl input::-webkit-outer-spin-button, .cwdqc .cwdqc-stepper__ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Plan cards */
.cwdqc-plans { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.cwdqc-plan {
	position: relative; display: grid; align-content: start; gap: 4px;
	border: 1px solid var(--cwdqc-line); border-radius: 8px; padding: 14px 16px; cursor: pointer; margin: 0;
}
.cwdqc-plan input { position: absolute; opacity: 0; pointer-events: none; }
.cwdqc-plan:focus-within { outline: 2px solid var(--cwdqc-ink); outline-offset: 2px; }
.cwdqc-plan.is-on { border-color: var(--cwdqc-accent); background: #fdf6f4; box-shadow: inset 0 0 0 1px var(--cwdqc-accent); }
.cwdqc-plan__name { font-size: 17px; }
.cwdqc-plan__price { color: var(--cwdqc-accent); font-weight: 700; font-size: 18px; }
.cwdqc-plan__desc { color: var(--cwdqc-muted); font-size: 14px; }

/* Inclusions */
.cwdqc-incl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cwdqc-incl li { position: relative; padding-left: 28px; margin: 0; }
.cwdqc-incl li::before {
	content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--cwdqc-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Summary */
.cwdqc-summary__title { margin-bottom: 14px !important; }
.cwdqc-lines { display: grid; gap: 0; margin-bottom: 8px; }
.cwdqc-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; border-bottom: 1px solid var(--cwdqc-soft); }
.cwdqc-row__amt { white-space: nowrap; font-weight: 600; }
.cwdqc-row.is-sub { border: 0; padding: 3px 0; color: var(--cwdqc-muted); font-size: 14px; }
.cwdqc-row.is-strong { border: 0; font-weight: 700; }
.cwdqc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 0 8px; border-top: 2px solid var(--cwdqc-ink); }
.cwdqc-total__label { font-weight: 700; }
.cwdqc-total__amt { font-size: 32px; font-weight: 700; color: var(--cwdqc-accent); line-height: 1; }
.cwdqc-monthly { margin-top: 16px; padding: 12px 14px; background: var(--cwdqc-soft); border-radius: 8px; }
.cwdqc-monthly .cwdqc-row { border-color: var(--cwdqc-line); }
.cwdqc-saving { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: #eaf6ee; color: #1e6b3a; font-size: 14px; font-weight: 600; }
.cwdqc-empty { color: var(--cwdqc-muted); margin: 0; }
.cwdqc-summary__foot { display: grid; gap: 10px; margin-top: 18px; }
.cwdqc-note { margin: 0; font-size: 13px; color: var(--cwdqc-muted); }

/* Buttons */
.cwdqc .cwdqc-btn {
	display: block; width: 100%; text-align: center; padding: 14px 18px; border-radius: 6px;
	font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer; text-decoration: none; border: 2px solid transparent;
	font-family: inherit;
}
.cwdqc .cwdqc-btn--primary { background: var(--cwdqc-accent); color: #fff !important; border-color: var(--cwdqc-accent); }
.cwdqc .cwdqc-btn--primary:hover, .cwdqc .cwdqc-btn--primary:focus-visible { background: var(--cwdqc-accent-dark); border-color: var(--cwdqc-accent-dark); }
.cwdqc .cwdqc-btn--primary:disabled { opacity: .6; cursor: wait; }
.cwdqc .cwdqc-btn--ghost { background: transparent; color: var(--cwdqc-ink) !important; border-color: var(--cwdqc-ink); }
.cwdqc .cwdqc-btn--ghost:hover, .cwdqc .cwdqc-btn--ghost:focus-visible { background: var(--cwdqc-ink); color: #fff !important; }
.cwdqc .cwdqc-hint a { color: var(--cwdqc-accent) !important; }

/* Form */
.cwdqc-form { display: grid; gap: 10px; padding: 14px; background: var(--cwdqc-soft); border-radius: 8px; }
.cwdqc-form__intro { margin: 0; font-size: 14px; }
.cwdqc-field { display: grid; gap: 4px; }
.cwdqc-field label { font-size: 14px; font-weight: 600; margin: 0; }
.cwdqc .cwdqc-field input, .cwdqc .cwdqc-field textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--cwdqc-line); border-radius: 6px;
	font: inherit; font-size: 16px; background: #fff; color: var(--cwdqc-ink); margin: 0; height: auto;
}
.cwdqc .cwdqc-field input:focus, .cwdqc .cwdqc-field textarea:focus { outline: 2px solid var(--cwdqc-accent); outline-offset: 0; border-color: var(--cwdqc-accent); }
.cwdqc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cwdqc-status { margin: 0; font-size: 14px; }
.cwdqc-status:empty { display: none; }
.cwdqc-status.is-error { color: var(--cwdqc-accent-dark); font-weight: 600; }
.cwdqc .cwdqc-done a { color: inherit !important; text-decoration: underline; }
.cwdqc-done { margin: 0; padding: 12px 14px; border-radius: 8px; background: #eaf6ee; color: #1e6b3a; font-weight: 600; }

/* Total bar (appended to <body>; shown by JS only in single-column layouts). */
body .cwdqc-bar {
	position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9990;
	display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 0; border-radius: 10px; margin: 0;
	background: var(--awb-color8, #050505); color: #fff; font-family: inherit; font-size: 15px; line-height: 1.2; text-align: left;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .35); cursor: pointer;
	transform: translateY(150%); opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s;
}
body .cwdqc-bar.is-shown { transform: none; opacity: 1; pointer-events: auto; }
body .cwdqc-bar__amt { color: #fff; font-size: 19px; }
body .cwdqc-bar__go { margin-left: auto; padding: 6px 12px; border-radius: 6px; background: var(--awb-color5, #c4381d); color: #fff; font-weight: 700; font-size: 14px; }

@container (max-width: 560px) {
	.cwdqc-card, .cwdqc-summary { padding: 18px 16px; }
	.cwdqc-option__head { flex-wrap: wrap; row-gap: 4px; }
	.cwdqc-option__text { flex: 1 1 calc(100% - 32px); }
	.cwdqc-option__price { margin-left: 32px; color: var(--cwdqc-accent); }
	.cwdqc-pages__num { font-size: 44px; }
}
