/* Custom Requirement configurator — design ref: iGreen_Landing_01.png */
/* Dedicated full-width blue container (does not touch header/footer/main).
   The theme lays its sections out with floats (.header_top_main and the
   footer's .make_an are both `float: left; width: 100%`), so this wrapper has
   to join that flow. As a plain block it sat beside the header float: the blue
   background painted full width but the cards were displaced, and only
   appeared once the sticky-header script pulled the header out of flow.
   `clear` drops us below those floats; `flow-root` keeps our own children
   contained without making this wrapper a float the footer would trip over. */
.cr-page { background-color: #1a6fe0; width: 100%; clear: both; display: flow-root; }
.cr-wrap {
	--cr-green: #17a04a;
	--cr-green-dark: #12833c;
	--cr-green-soft: #e9f7ee;
	--cr-blue: #1667d6;
	--cr-blue-soft: #eaf2fd;
	--cr-ink: #1c2b39;
	--cr-muted: #6b7a88;
	--cr-line: #e4e9ef;
	max-width: 1280px;
	margin: 0 auto;
	padding: 20px 16px 48px;
	font-family: "Open Sans", Arial, sans-serif;
	color: var(--cr-ink);
}
.cr-wrap * { box-sizing: border-box; }

/* Hero (transparent — sits on the blue page container) */
.cr-hero {
	position: relative;
	text-align: center;
	background: transparent;
	color: #fff;
	padding: 30px 20px;
	margin-bottom: 22px;
	overflow: hidden;
}
.cr-hero h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; color: #fff; line-height: 1.2; position: relative; z-index: 1; }
.cr-hero p { margin: 0; font-size: 15px; opacity: .95; position: relative; z-index: 1; }
.cr-hero::before, .cr-hero::after {
	content: "\f06c"; font-family: "FontAwesome"; /* leaf */
	position: absolute; top: 18px; font-size: 76px; color: rgba(255, 255, 255, .12); z-index: 0;
}
.cr-hero::before { left: 34px; transform: rotate(-20deg); }
.cr-hero::after { right: 34px; transform: rotate(20deg) scaleX(-1); }
@media (max-width: 860px) { .cr-hero::before, .cr-hero::after { display: none; } }

/* Grid: left column = Section 1 + Section 2 stacked; right column = Section 3 */
.cr-grid {
	display: grid;
	/* Contact card runs a little wider than the mockup's ~1/3 so its two-column
	   field grid has room; the left stack gives up the difference. */
	grid-template-columns: 1.8fr 1fr;
	grid-template-areas: "configure contact" "quote contact";
	gap: 20px;
	align-items: stretch;
}
.cr-configure { grid-area: configure; }
.cr-contact { grid-area: contact; }
.cr-quote { grid-area: quote; }

.cr-card {
	background: #fff;
	border: 1px solid var(--cr-line);
	border-radius: 16px;
	padding: 20px;
	box-shadow: 0 8px 24px rgba(20, 40, 70, .06);
}
.cr-card h2 {
	display: flex; align-items: center; gap: 9px;
	font-size: 18px; font-weight: 800; margin: 0 0 16px; color: var(--cr-ink);
}

/* Fallback shown when the configurator is not enabled for a product */
.cr-unavailable {
	display: flex; align-items: center; gap: 12px;
	margin-top: 20px;
	background: var(--cr-blue-soft);
	border-color: #cfe0f6;
	color: #2b3f56;
}
.cr-unavailable .fa { color: var(--cr-blue); font-size: 22px; flex: 0 0 auto; }
.cr-unavailable p { margin: 0; font-size: 15px; font-weight: 600; }
.cr-step {
	display: inline-flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	background: var(--cr-green); color: #fff; font-size: 14px; font-weight: 700; flex: 0 0 auto;
}
.cr-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cr-card-head h2 { margin: 0; }
.cr-help { display: inline-flex; align-items: center; gap: 6px; color: var(--cr-green-dark); font-size: 14px; font-weight: 600; white-space: nowrap; }

.cr-i { color: var(--cr-muted); font-size: 13px; }

/* Styled tooltip (hover + keyboard focus) */
.cr-tip { position: relative; display: inline-flex; align-items: center; gap: 6px; cursor: help; outline: none; }
.cr-tip::after, .cr-tip::before { opacity: 0; visibility: hidden; transition: opacity .15s ease, transform .15s ease; pointer-events: none; z-index: 30; }
.cr-tip::after {
	content: attr(data-tip);
	position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px); margin-bottom: 10px;
	width: max-content; max-width: 240px; white-space: normal;
	background: #1c2b39; color: #fff; padding: 9px 12px; border-radius: 8px;
	font-size: 12px; font-weight: 400; line-height: 1.45; text-align: left;
	box-shadow: 0 8px 22px rgba(15, 30, 55, .28);
}
.cr-tip::before {
	content: ""; position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px);
	border: 6px solid transparent; border-top-color: #1c2b39;
}
.cr-tip:hover::after, .cr-tip:focus::after { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.cr-tip:hover::before, .cr-tip:focus::before { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.cr-label { display: block; font-weight: 700; margin-bottom: 12px; font-size: 14px; }
/* "Opzioni aggiuntive" sits under a divider, as in the mockup */
.cr-label-mt { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--cr-line); }

/* Section 1: three columns — quantity and type stay tight so the swatch
   column keeps the room it needs for two variations per row. */
.cr-cols { display: grid; grid-template-columns: 0.9fr 0.92fr 1.18fr; gap: 22px; }
.cr-col { min-width: 0; }

/* Quantity buttons */
.cr-quantities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-qty {
	position: relative;
	border: 1px solid var(--cr-line); background: #fff; border-radius: 10px;
	padding: 12px 6px; font-weight: 700; font-size: 14px; cursor: pointer;
	transition: .15s; color: var(--cr-ink);
}
.cr-qty:hover { border-color: var(--cr-green); }
.cr-qty.is-active { border-color: var(--cr-green); background: var(--cr-green-soft); color: var(--cr-green-dark); }
.cr-qty.is-active::after {
	content: "\f058"; font-family: "FontAwesome"; color: var(--cr-green);
	position: absolute; top: -8px; right: -8px; font-size: 16px;
	background: #fff; border-radius: 50%; line-height: 1;
}
.cr-qty.is-disabled { opacity: .4; cursor: not-allowed; }
.cr-qty.is-disabled:hover { border-color: var(--cr-line); }
.cr-qty-custom { margin-top: 10px; width: 100%; padding: 12px; border: 1px solid var(--cr-line); border-radius: 10px; }
.cr-qty-note { display: flex; gap: 6px; align-items: flex-start; margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--cr-green-dark); }
.cr-qty-note .fa { margin-top: 2px; }
.cr-qty-note.is-error { color: #c0392b; }

/* Info boxes under quantity / type */
.cr-box { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 14px; margin-top: 16px; font-size: 13px; line-height: 1.45; }
.cr-box .fa { margin-top: 2px; font-size: 16px; }
.cr-box-green { background: var(--cr-green-soft); color: #2b4a37; }
.cr-box-green .fa { color: var(--cr-green); }
.cr-box-blue { background: var(--cr-blue-soft); color: #2b3f56; }
.cr-box-blue .fa { color: var(--cr-blue); }
.cr-box-blue a { color: var(--cr-blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
.cr-box-blue a:hover { text-decoration: underline; }

/* Types (radios) */
.cr-types { display: flex; flex-direction: column; gap: 7px; }
.cr-radio { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; cursor: pointer; font-size: 12px; }
.cr-radio input { accent-color: var(--cr-green); width: 13px; height: 13px; flex: 0 0 auto; }
.cr-radio > span { min-width: 0; }
.cr-badge {
	font-style: normal; font-size: 9.5px; font-weight: 700; color: var(--cr-green-dark);
	background: #dff1e6; border-radius: 20px; padding: 2px 7px;
}

/* Color swatches — two per row, every variation shown (no scroll container) */
.cr-swatches {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 2px;
}
.cr-swatch {
	position: relative; min-width: 0;
	border: 2px solid var(--cr-line); background: #fff; border-radius: 8px;
	padding: 5px 4px; cursor: pointer; text-align: center; transition: .15s;
}
.cr-swatch:hover { border-color: var(--cr-green); }
.cr-swatch.is-active { border-color: var(--cr-green); }
.cr-swatch.is-active::after {
	content: "\f058"; font-family: "FontAwesome"; color: var(--cr-green);
	position: absolute; bottom: -7px; right: -7px; font-size: 15px;
	background: #fff; border-radius: 50%; line-height: 1;
}
.cr-swatch img { width: 100%; height: 36px; object-fit: contain; display: block; margin-bottom: 4px; }
.cr-swatch-ph {
	display: flex; align-items: center; justify-content: center; height: 36px; margin-bottom: 4px;
	background: #f3f6fa; border-radius: 8px; color: #b6c2d0;
}
.cr-swatch-ph .fa { font-size: 16px; }
.cr-swatch.is-noimg::before {
	content: "\f1b2"; font-family: "FontAwesome"; /* cube */
	display: flex; align-items: center; justify-content: center; height: 36px; margin-bottom: 4px;
	background: #f3f6fa; border-radius: 8px; color: #b6c2d0; font-size: 16px;
}
/* Variation names run long — wrap them instead of widening the tile. */
.cr-swatch-label { font-size: 9.5px; font-weight: 600; display: block; line-height: 1.25; overflow-wrap: anywhere; }

/* Options (checkboxes) */
.cr-options { display: flex; flex-direction: column; gap: 7px; }
.cr-check { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.cr-check input { accent-color: var(--cr-green); width: 13px; height: 13px; flex: 0 0 auto; }

.cr-card-foot { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--cr-line); font-size: 13px; color: var(--cr-muted); }
.cr-card-foot .fa { color: var(--cr-blue); }

/* Section 2 budget: range | what it includes | shipping */
.cr-quote-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 12px; }
.cr-quote-cell {
	border: 1px solid var(--cr-line); border-radius: 12px; padding: 18px 14px; text-align: center;
	display: flex; flex-direction: column; gap: 5px; justify-content: center;
}
.cr-quote-cell { min-width: 0; }
.cr-quote-k { font-size: 13px; color: var(--cr-ink); font-weight: 700; }
/* The figures scale with the cell so a long range never pushes the grid wider. */
.cr-quote-cell strong { font-size: clamp(17px, 1.9vw, 22px); color: var(--cr-ink); line-height: 1.15; overflow-wrap: anywhere; }
.cr-quote-cell em { font-style: normal; font-size: 12px; color: var(--cr-muted); }
.cr-quote-budget { background: var(--cr-green-soft); border-color: var(--cr-green); }
.cr-quote-budget strong { color: var(--cr-green-dark); font-size: clamp(19px, 2.2vw, 26px); font-weight: 800; }

/* "Il budget comprende" checklist */
.cr-includes { list-style: none; margin: 8px 0 0; padding: 0; text-align: left; }
.cr-includes li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; padding: 3px 0; }
.cr-includes .fa { color: var(--cr-green); margin-top: 2px; }

/* Section 2 delivery info row — one border around all four items.
   Horizontal padding stays tight so the longer titles keep their single line. */
.cr-delivery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 18px; border: 1px solid var(--cr-line); border-radius: 12px; overflow: hidden; }
.cr-delivery-item { display: flex; align-items: center; gap: 9px; padding: 19px 6px; min-width: 0; }
.cr-delivery-item .fa { color: var(--cr-blue); font-size: 20px; width: 22px; text-align: center; flex: 0 0 auto; }
.cr-delivery-item > div { min-width: 0; }
.cr-delivery-item strong { display: block; font-size: 11px; }
.cr-delivery-item small { color: var(--cr-muted); font-size: 12px; }

.cr-note {
	display: flex; gap: 10px; align-items: flex-start;
	margin-top: 18px; font-size: 13px; color: #3f5a49;
	background: var(--cr-green-soft); border-radius: 12px; padding: 14px 16px;
}
.cr-note .fa { color: var(--cr-green); margin-top: 2px; }
.cr-note > span { flex: 1; }
.cr-note-link { color: var(--cr-green-dark); font-weight: 700; white-space: nowrap; text-decoration: none; }
a.cr-note-link:hover { text-decoration: underline; }

/* Section 3 contact */
.cr-contact .cr-sub { font-size: 14px; color: var(--cr-muted); margin: 0 0 16px; }

/* "Come acquisti?" buyer-type buttons */
.cr-buyer-label { margin-bottom: 10px; }
.cr-buyers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cr-buyer {
	position: relative;
	display: flex; align-items: center; justify-content: center; text-align: center;
	border: 1px solid var(--cr-line); border-radius: 10px; padding: 12px 6px;
	font-size: 13px; font-weight: 700; cursor: pointer; transition: .15s; line-height: 1.25;
}
.cr-buyer:hover { border-color: var(--cr-green); }
.cr-buyer input { position: absolute; opacity: 0; width: 0; height: 0; }
.cr-buyer.is-active { border-color: var(--cr-green); background: var(--cr-green-soft); color: var(--cr-green-dark); }
.cr-buyer-note {
	display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 14px;
	background: var(--cr-green-soft); border-radius: 10px; padding: 11px 13px;
	font-size: 13px; color: #2b4a37;
}
.cr-buyer-note .fa { color: var(--cr-green); margin-top: 2px; }

/* Upload prompt: round icon on the left, copy on the right, footnote centred */
.cr-upload {
	position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center;
	gap: 14px; border: 1px dashed #b9cbe6; border-radius: 14px; background: var(--cr-blue-soft);
	padding: 18px; cursor: pointer; margin-bottom: 10px;
}
.cr-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.cr-upload .fa-cloud-upload {
	display: inline-flex; align-items: center; justify-content: center;
	width: 38px; height: 38px; border-radius: 50%; background: var(--cr-blue); color: #fff;
	font-size: 18px;
}
.cr-upload-copy { display: block; }
.cr-upload-copy strong { display: block; font-size: 14px; color: #2b3f56; }
.cr-upload-copy > span { display: block; font-size: 13px; color: #48607d; }
.cr-upload-copy > .cr-upload-link { color: var(--cr-blue); font-weight: 700; }
.cr-upload small { grid-column: 1 / -1; text-align: center; color: var(--cr-muted); font-weight: 400; font-size: 12px; }
.cr-file-name { grid-column: 1 / -1; }
.cr-file-name { display: block; margin-top: 8px; font-weight: 700; color: var(--cr-green-dark); font-size: 13px; }
.cr-file-error { color: #c0392b; font-size: 13px; margin-bottom: 10px; }

.cr-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
.cr-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.cr-inputs .cr-full { grid-column: 1 / -1; }
.cr-inputs input, .cr-inputs textarea {
	border: 1px solid var(--cr-line); border-radius: 8px; padding: 11px 12px; font-size: 14px; font-weight: 400;
	width: 100%;
}
.required { color: #c0392b; }

/* The theme styles .g-recaptcha globally as `float: right; width: 85%`
   (css/style.css:7531), which drags the privacy line around the widget.
   Reset it inside the configurator. */
.cr-wrap .g-recaptcha { float: none; width: auto; border: 0; padding: 0; margin: 0 0 12px; }

.cr-privacy { display: flex; gap: 8px; align-items: flex-start; clear: both; font-size: 12px; color: var(--cr-muted); margin: 14px 0; }
.cr-privacy .fa { margin-top: 2px; }
.cr-privacy a { color: var(--cr-blue); text-decoration: underline; }
.cr-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; border: 0; border-radius: 12px; cursor: pointer;
	background: var(--cr-green); color: #fff; font-weight: 800; font-size: 13.5px; padding: 15px;
	transition: .15s; text-transform: none; line-height: 1.3;
}
.cr-btn:hover { background: var(--cr-green-dark); }
.cr-loader { display: block; margin: 12px auto 0; }
.cr-noobligation { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--cr-green-dark); font-weight: 700; font-size: 13px; margin: 14px 0 0; }

/* Section 4 downloads — 3 columns: title | download 1 | download 2 */
.cr-downloads { margin-top: 20px; }
.cr-downloads-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: start; }
.cr-downloads-grid h2 { margin: 0; align-items: flex-start; }
.cr-download-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
@media (max-width: 600px) { .cr-downloads-grid, .cr-download-list { grid-template-columns: 1fr; } }
.cr-dl-title { display: flex; flex-direction: column; gap: 4px; }
.cr-downloads-sub { font-weight: 400; color: var(--cr-muted); font-size: 13.5px; display: block; }
.cr-download {
	display: flex; align-items: center; gap: 12px; text-decoration: none;
	border: 1px solid var(--cr-line); border-radius: 12px; padding: 15px 20px; color: var(--cr-ink);
	font-size: 14px;
}
.cr-download:hover, .cr-download:hover *, .cr-download:focus { text-decoration: none; }
.cr-download:hover { border-color: var(--cr-green); background: var(--cr-green-soft); }
.cr-download .fa { font-size: 20px; color: var(--cr-green); }
.cr-download strong { display: block; }
.cr-download small { color: var(--cr-muted); }

/* Contact input caption keeps label + required mark on one line */
.cr-cap { display: inline; }
.cr-cap .required { margin-left: 2px; }

/* Submit feedback — sits directly under the submit button, inside the contact card */
#cr-results:empty { display: none; }
#cr-results .error,
#cr-results .success {
	margin-top: 12px; border-radius: 12px; padding: 12px 14px;
	font-size: 13px; font-weight: 700; text-align: center;
}
#cr-results .error { color: #c0392b; background: #fdecea; border: 1px solid #f5c6c0; }
#cr-results .success { color: var(--cr-green-dark); background: var(--cr-green-soft); border: 1px solid var(--cr-green); }
#cr-results ul { list-style: none; margin: 0; padding: 0; text-align: left; }
#cr-results li + li { margin-top: 6px; }
#cr-results li::before { content: "\f071"; font-family: FontAwesome; margin-right: 8px; }

/* Responsive */
/* Stacked layout: follow the numbered steps (1 configure, 2 quote, 3 contact)
   rather than the DOM order, which puts section 3 before 2 for the desktop grid. */
@media (max-width: 1024px) {
	.cr-grid { grid-template-columns: 1fr; grid-template-areas: "configure" "quote" "contact"; }
}
@media (max-width: 860px) {
	.cr-cols { grid-template-columns: 1fr; gap: 26px; }
	.cr-swatches { grid-template-columns: repeat(4, 1fr); }
	.cr-quote-grid { grid-template-columns: 1fr; }
	.cr-delivery { grid-template-columns: 1fr 1fr; }
	.cr-inputs { grid-template-columns: 1fr; }
	.cr-hero h1 { font-size: 24px; }
	.cr-note { flex-wrap: wrap; }
}
@media (max-width: 480px) {
	.cr-swatches { grid-template-columns: repeat(2, 1fr); }
	.cr-buyers { grid-template-columns: 1fr; }
	.cr-delivery { grid-template-columns: 1fr; }
}
