/**
 * Cercos quote form.
 * Loaded only on /cotiza-tu-cerco-de-obra/.
 */

.yx-quote-section-wrap {
	overflow-x: clip;
}

.yx-quote-container {
	max-width: 920px;
}

.yx-quote-heading {
	max-width: 760px;
	margin: 0 auto 2rem;
	text-align: center;
}

.yx-quote-heading h2 {
	margin-bottom: 0.75rem;
}

.yx-required-note {
	font-size: 1.0625rem;
	line-height: 1.5;
}

.yx-required-note span,
.yx-quote-form label > span[aria-hidden="true"] {
	color: #9d2f24;
	font-weight: 800;
}

.yx-quote-card {
	padding: clamp(1.1rem, 3vw, 2.5rem);
	border: 1px solid rgba(21, 35, 44, 0.16);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(12, 28, 38, 0.1);
}

.yx-form-message:empty {
	display: none;
}

.yx-form-message .form-message {
	margin: 0 0 1.5rem;
	padding: 0.9rem 1rem;
	border: 1px solid currentColor;
	border-radius: 10px;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.5;
}

.yx-form-message .success {
	color: #17683c;
	background: #edf8f1;
}

.yx-form-message .notice {
	color: #5d4a12;
	background: #fff9df;
}

.yx-form-message .error {
	color: #84261e;
	background: #fff1ef;
}

.yx-quote-fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.yx-quote-fieldset + .yx-quote-fieldset {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(21, 35, 44, 0.14);
}

.yx-quote-fieldset legend {
	width: 100%;
	margin-bottom: 1.15rem;
	color: var(--yx-dark, #15232c);
	font-size: clamp(1.25rem, 2vw, 1.4rem);
	font-weight: 800;
}

.yx-quote-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.85rem 1.25rem;
}

.yx-quote-form label,
.yx-field-label {
	display: block;
	min-width: 0;
	color: var(--yx-dark, #15232c);
	font-weight: 700;
}

.yx-quote-form input:not([type="hidden"]):not([type="checkbox"]),
.yx-quote-form select,
.yx-quote-form textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	margin-top: 0.45rem;
	padding: 0.75rem 0.85rem;
	border: 1px solid #82909a;
	border-radius: 8px;
	background: #fff;
	color: #15232c;
	font: inherit;
	line-height: 1.35;
}

.yx-quote-form input:not([type="hidden"]):not([type="checkbox"]),
.yx-quote-form select {
	min-height: 52px;
}

.yx-quote-form textarea {
	min-height: 135px;
	resize: vertical;
}

.yx-quote-form input:focus-visible,
.yx-quote-form select:focus-visible,
.yx-quote-form textarea:focus-visible,
.yx-quote-form button:focus-visible,
.yx-quote-form a:focus-visible {
	outline: 3px solid var(--yx-accent, #20a8d8);
	outline-offset: 3px;
}

.yx-quote-form [aria-invalid="true"] {
	border-color: #9d2f24 !important;
	box-shadow: 0 0 0 1px #9d2f24;
}

.yx-quote-form small {
	display: block;
	margin-top: 0.35rem;
	color: #52616b;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
}

.yx-field-error {
	display: block;
	min-height: 1.25rem;
	margin-top: 0.35rem;
	color: #84261e;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.5;
}

.yx-conditional-field[hidden],
.yx-conditional-note[hidden] {
	display: none !important;
}

.yx-conditional-note {
	margin: 0;
	padding: 0.85rem 1rem;
	border-left: 4px solid var(--yx-accent, #20a8d8);
	background: #f1f7fa;
}

.yx-quote-notes {
	margin-top: 1.5rem;
	padding: 0.9rem 1rem;
	border-left: 4px solid var(--yx-accent, #20a8d8);
	background: #f1f7fa;
}

.yx-quote-notes p,
.yx-quote-whatsapp-note {
	margin: 0;
	font-size: 1.0625rem;
	line-height: 1.55;
}

.yx-quote-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	margin-top: 1.25rem;
}

.yx-quote-actions .button {
	width: 100%;
	min-height: 48px;
	justify-content: center;
	text-align: center;
}

.yx-quote-whatsapp-note {
	margin-top: 0.85rem;
	color: #45545e;
}

.yx-quote-form .yx-antispam-field {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

@media (min-width: 768px) {
	.yx-quote-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.yx-form-full {
		grid-column: 1 / -1;
	}

	.yx-quote-actions {
		flex-direction: row;
		align-items: stretch;
	}

	.yx-quote-actions .button {
		width: auto;
		min-width: 230px;
	}
}
