/**
 * Formulario de solicitud de presupuesto.
 * Paleta y tipografías tomadas del formulario de contacto de la web.
 */

.bcq-wrap {
	--bcq-radius: 6px;
	--bcq-radius-card: 24px;
	--bcq-gap: 20px;
	--bcq-error: #dc2626;

	box-sizing: border-box;
	max-width: var(--bcq-max-width, 860px);
	margin-left: auto;
	margin-right: auto;
	font-family: var(--bcq-font-body, "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif);
	font-size: 15px;
	line-height: 1.6;
	color: var(--bcq-ink, #191d29);
	-webkit-font-smoothing: antialiased;
}

.bcq-wrap *,
.bcq-wrap *::before,
.bcq-wrap *::after {
	box-sizing: inherit;
}

.bcq-wrap--card {
	background: var(--bcq-surface, #f6f7f8);
	border-radius: var(--bcq-radius-card);
	padding: clamp(24px, 4vw, 44px);
}

/* --- Cabecera --- */

.bcq-wrap .bcq-title {
	margin: 0 0 .5em;
	font-family: var(--bcq-font-title, "Space Grotesk", system-ui, sans-serif);
	font-size: clamp(26px, 3.2vw, 34px);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -.02em;
	color: var(--bcq-ink, #191d29);
}

.bcq-wrap .bcq-intro {
	margin: 0 0 30px;
	max-width: 60ch;
	color: var(--bcq-muted, #5b6472);
}

/* --- Secciones --- */

.bcq-form .bcq-section {
	border: 0;
	border-top: 1px solid var(--bcq-hairline, rgba(25, 29, 41, .1));
	margin: 0 0 var(--bcq-gap);
	padding: 26px 0 0;
	min-width: 0;
}

.bcq-form .bcq-section:first-of-type {
	border-top: 0;
	padding-top: 0;
}

.bcq-legend {
	display: block;
	float: left;
	width: 100%;
	padding: 0;
	margin: 0 0 18px;
	font-family: var(--bcq-font-title, "Space Grotesk", system-ui, sans-serif);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -.01em;
	color: var(--bcq-ink, #191d29);
}

.bcq-legend + * {
	clear: both;
}

/* --- Rejilla --- */

.bcq-grid {
	display: grid;
	gap: var(--bcq-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin-bottom: var(--bcq-gap);
}

.bcq-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bcq-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bcq-grid:last-child {
	margin-bottom: 0;
}

.bcq-field--wide {
	grid-column: 1 / -1;
}

/* --- Campos --- */

.bcq-label {
	display: block;
	margin-bottom: 7px;
	font-size: 12.5px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: .005em;
	color: var(--bcq-ink, #191d29);
}

.bcq-req {
	margin-left: 2px;
	color: var(--bcq-error);
	font-weight: 700;
}

.bcq-form .bcq-input {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--bcq-ink, #191d29);
	background-color: #fff;
	background-image: none;
	border: 1px solid var(--bcq-border, #d1d5db);
	border-radius: var(--bcq-radius);
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.bcq-form .bcq-input::placeholder {
	color: #9aa2ae;
}

.bcq-form select.bcq-input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	/* Altura fija y sin relleno vertical: es la forma fiable de centrar el
	   texto de un <select> en todos los navegadores y evitar que se recorte. */
	height: 47px;
	min-height: 47px;
	padding: 0 38px 0 14px;
	line-height: normal;
	text-overflow: ellipsis;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%23191d29' d='M1.1 0 6 4.9 10.9 0 12 1.1 6 7.1 0 1.1z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 10px;
	cursor: pointer;
}

.bcq-form select.bcq-input::-ms-expand {
	display: none;
}

.bcq-form input.bcq-input {
	height: 47px;
}

.bcq-form textarea.bcq-input {
	min-height: 130px;
	resize: vertical;
}

.bcq-form .bcq-input:hover {
	border-color: #b6bdc7;
}

.bcq-form .bcq-input:focus,
.bcq-form .bcq-input:focus-visible {
	outline: none;
	border-color: var(--bcq-accent, #63f2b0);
	box-shadow: 0 0 0 3px rgba(99, 242, 176, .35);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bcq-accent, #63f2b0) 40%, transparent);
}

.bcq-field--error .bcq-input,
.bcq-field--error .bcq-file {
	border-color: var(--bcq-error);
}

.bcq-error {
	margin: 7px 0 0;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--bcq-error);
}

.bcq-help {
	margin: 8px 0 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--bcq-muted, #5b6472);
}

.bcq-help__size {
	display: block;
	margin-top: 2px;
	font-size: 11.5px;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: #8a929e;
}

/* --- Archivos --- */

.bcq-file {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 47px;
	padding: 5px 12px 5px 5px;
	background: #fff;
	border: 1px solid var(--bcq-border, #d1d5db);
	border-radius: var(--bcq-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.bcq-file input[type="file"] {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.bcq-file__button {
	flex: none;
	padding: 10px 16px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	line-height: 1;
	text-transform: uppercase;
	color: #fff;
	background: var(--bcq-ink, #191d29);
	border-radius: 4px;
	transition: background .15s ease, color .15s ease;
}

.bcq-file__name {
	min-width: 0;
	font-size: 13px;
	color: #8a929e;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bcq-file--filled {
	border-color: var(--bcq-accent, #63f2b0);
}

.bcq-file--filled .bcq-file__name {
	color: var(--bcq-ink, #191d29);
	font-weight: 600;
}

.bcq-file--filled .bcq-file__button {
	background: var(--bcq-accent, #63f2b0);
	color: var(--bcq-accent-text, #063231);
}

.bcq-file:focus-within {
	border-color: var(--bcq-accent, #63f2b0);
	box-shadow: 0 0 0 3px rgba(99, 242, 176, .35);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bcq-accent, #63f2b0) 40%, transparent);
}

/* --- Privacidad --- */

.bcq-privacy {
	margin: 6px 0 28px;
}

.bcq-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: 13.5px;
	line-height: 1.5;
	cursor: pointer;
}

.bcq-check input[type="checkbox"] {
	position: relative;
	flex: none;
	appearance: none;
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	background: #fff;
	border: 1px solid var(--bcq-border, #d1d5db);
	border-radius: 4px;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.bcq-check input[type="checkbox"]:checked {
	background: var(--bcq-accent, #63f2b0);
	border-color: var(--bcq-accent, #63f2b0);
}

.bcq-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid var(--bcq-accent-text, #063231);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bcq-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--bcq-ink, #191d29);
	outline-offset: 2px;
}

.bcq-check a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bcq-check--error {
	color: var(--bcq-error);
}

/* --- Acciones --- */

.bcq-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
}

.bcq-form .bcq-submit {
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	line-height: 1;
	padding: 17px 34px;
	color: var(--bcq-accent-text, #063231);
	background: var(--bcq-accent, #63f2b0);
	border: 0;
	border-radius: var(--bcq-radius);
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}

.bcq-form .bcq-submit:hover {
	filter: brightness(.95);
	box-shadow: 0 6px 18px rgba(25, 29, 41, .12);
}

.bcq-form .bcq-submit:active {
	transform: translateY(1px);
	box-shadow: none;
}

.bcq-form .bcq-submit:focus-visible {
	outline: 2px solid var(--bcq-ink, #191d29);
	outline-offset: 3px;
}

.bcq-form .bcq-submit[disabled] {
	opacity: .65;
	cursor: progress;
	filter: none;
	box-shadow: none;
}

.bcq-required-note {
	margin: 0;
	font-size: 12.5px;
	color: var(--bcq-muted, #5b6472);
}

/* --- Avisos --- */

.bcq-notice {
	margin: 0 0 24px;
	padding: 16px 18px;
	background: #fff;
	border: 1px solid var(--bcq-border, #d1d5db);
	border-left: 4px solid;
	border-radius: var(--bcq-radius);
	font-size: 14.5px;
}

.bcq-notice--success {
	border-left-color: var(--bcq-accent, #63f2b0);
}

.bcq-notice--error {
	border-left-color: var(--bcq-error);
}

/* --- Barra de progreso --- */

.bcq-progress {
	margin-top: 18px;
	height: 5px;
	border-radius: 3px;
	background: rgba(25, 29, 41, .1);
	overflow: hidden;
}

.bcq-progress__bar {
	height: 100%;
	width: 0;
	background: var(--bcq-accent, #63f2b0);
	transition: width .2s ease;
}

/* --- Campo trampa --- */

.bcq-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Responsive --- */

@media (max-width: 900px) {
	.bcq-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.bcq-grid,
	.bcq-grid--3,
	.bcq-grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.bcq-form .bcq-submit {
		width: 100%;
	}

	.bcq-wrap--card {
		border-radius: 16px;
	}
}

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