/**
 * Zerox Quote Popup — estilos del modal.
 * Namespace .zqp-* para no interferir con el tema.
 */

.zqp-btn {
	display: inline-block;
	width: 100%;
	padding: 14px 22px;
	font-family: inherit;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .02em;
	text-align: center;
	color: #fff;
	background: #fe5200;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
	transition: filter .15s ease;
}

.zqp-btn:hover {
	filter: brightness(.93);
}

body.zqp-open {
	overflow: hidden;
}

.zqp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.zqp-modal[hidden] {
	display: none;
}

.zqp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
}

.zqp-dialog {
	position: relative;
	background: #fff;
	border-radius: 12px;
	width: 100%;
	max-width: 500px;
	max-height: 92vh;
	overflow-y: auto;
	padding: 28px 26px 26px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
	font-family: inherit;
	color: #222;
	border-radius: 12px !important;
}

.zqp-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: #f1f3f6;
	border: 0;
	border-radius: 50%;
	color: #6b7280;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
	min-height: 0px !important;
	margin-right: 0px !important;
}

.zqp-close:hover,
.zqp-close:focus-visible {
	background: #e6e9ee;
	color: #111;
}

.zqp-close svg {
	display: block;
	pointer-events: none;
}

.zqp-head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 18px;
	padding-right: 26px;
}

.zqp-icon {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f0f0f0;
	border-radius: 12px;
	overflow: hidden;
}

.zqp-icon img {
	width: 34px;
	height: 34px;
	object-fit: contain;
	display: block;
}

.zqp-head-txt {
	min-width: 0;
}

.zqp-title {
	margin: 0 0 2px;
	font-size: 1.22rem;
	font-weight: 700;
	line-height: 1.25;
}

.zqp-product {
	margin: 0;
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .02em;
	opacity: .6;
	line-height: 1.4;
}

.zqp-intro {
	margin: 0 0 10px;
	font-size: .88rem;
	font-weight: 600;
}

.zqp-tipo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 14px;
}

.zqp-tipo-btn {
	padding: 12px 8px;
	font-family: inherit;
	font-size: .73rem;
	font-weight: 700;
	letter-spacing: .03em;
	border: 1px solid #e6e9ee;
	border-radius: 7px;
	background: #f5f6f8;
	color: #6b7280;
	cursor: pointer;
	transition: all .15s ease;
	margin-right: 0px !important;
	margin-bottom :0px !important;
}

.zqp-tipo-btn:hover {
	border-color: #cfd6df;
}

.zqp-tipo-btn.is-active {
	background: #1f2937;
	border-color: #1f2937;
	color: #fff;
	box-shadow: 0 2px 8px rgba(31, 41, 55, .18);
}

.zqp-field {
	margin-bottom: 12px;
	min-width: 0;
}

.zqp-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 12px;
}

.zqp-label {
	display: block;
	margin-bottom: 5px;
	font-size: .78rem;
	font-weight: 600;
	color: #4a5260;
	letter-spacing: .01em;
}

.zqp-req {
	color: #fe5200;
	margin-left: 3px;
}

.zqp-field input {
	width: 100%;
	padding: 13px 18px;
	font-family: inherit;
	font-size: .9rem;
	color: #222;
	background: #f5f6f8;
	border: 1px solid #e6e9ee;
	border-radius: 7px;
	transition: background .15s ease, border-color .15s ease;
}

.zqp-field input::placeholder {
	color: #a8aeb8;
}

.zqp-field input:focus {
	background: #fff;
	border-color: #fe5200;
	outline: 3px solid rgba(254, 82, 0, .13);
	outline-offset: 0;
}

.zqp-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 6px 0 16px;
	padding: 11px 14px;
	background: #f8f9fb;
	border-radius: 7px;
	font-size: .73rem;
	line-height: 1.5;
	color: #5b6270;
	cursor: pointer;
}

.zqp-consent input {
	accent-color: #fe5200;
}

.zqp-consent input {
	margin-top: 2px;
	flex: 0 0 auto;
}

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

.zqp-msg {
	margin: 0 0 10px;
	font-size: .84rem;
	line-height: 1.45;
	min-height: 1px;
}

.zqp-msg.is-error {
	color: #c0392b;
}

.zqp-msg.is-ok {
	color: #1a7f47;
}

.zqp-submit {
	display: block;
	width: 100%;
	padding: 15px;
	font-family: inherit;
	font-size: .88rem;
	font-weight: 700;
	letter-spacing: .03em;
	text-align: center;
	text-decoration: none;
	color: #fff;
	background: #fe5200;
	border: 0;
	border-radius: 7px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(254, 82, 0, .28);
}

.zqp-submit:hover {
	filter: brightness(.94);
}

/* El botón de WhatsApp conserva el verde de la plataforma. */
.zqp-wa {
	background: #25d366;
	box-shadow: 0 4px 14px rgba(37, 211, 102, .28);
}

.zqp-submit:disabled {
	opacity: .7;
	cursor: default;
}

.zqp-done {
	text-align: center;
	padding: 10px 0;
}

.zqp-done-title {
	margin: 0 0 6px;
	font-size: 1.2rem;
	font-weight: 700;
}

.zqp-code {
	margin: 10px 0 16px;
	font-family: monospace;
	font-size: .82rem;
	letter-spacing: .06em;
	opacity: .55;
}

@media (max-width: 560px) {

	/* El modal ocupa toda la pantalla: en móviles pequeños un diálogo
	   centrado con márgenes deja el formulario sin espacio y obliga a
	   desplazar la página entera en lugar del contenido. */
	.zqp-modal {
		padding: 30px 20px;
	}

	.zqp-dialog {
		max-width: none;
		max-height: none;
		height: 100%;
		border-radius: 0;
		padding: 18px 16px 22px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.zqp-close {
		top: 10px;
		right: 10px;
		width: 34px;
		height: 34px;
	}

	/* Encabezado más compacto para ganar altura útil. */
	.zqp-head {
		gap: 11px;
		margin-bottom: 14px;
		padding-right: 40px;
	}

	.zqp-icon {
		width: 42px;
		height: 42px;
		border-radius: 9px;
	}

	.zqp-icon img,
	.zqp-icon svg {
		width: 26px;
		height: 26px;
	}

	.zqp-title {
		font-size: 1.05rem;
	}

	.zqp-product {
		font-size: .72rem;
	}

	.zqp-intro {
		margin-bottom: 8px;
		font-size: .84rem;
	}

	.zqp-tipo {
		gap: 8px;
		margin-bottom: 12px;
	}

	.zqp-tipo-btn {
		padding: 10px 6px;
		font-size: .68rem;
	}

	/* Campos apilados y algo más bajos. */
	.zqp-grid {
		grid-template-columns: 1fr;
	}

	.zqp-field {
		margin-bottom: 10px;
	}

	.zqp-field input {
		padding: 11px 14px;
		font-size: 14px; /* Evita que iOS haga zoom al enfocar. */
		margin-bottom: 0px !important;
	}

	.zqp-label {
		font-size: .74rem;
		margin-bottom: 4px;
	}

	.zqp-hint {
		margin-left: 14px;
		font-size: .68rem;
	}

	.zqp-consent {
		padding: 9px 11px;
		margin: 4px 0 12px;
		font-size: .7rem;
	}

	.zqp-submit {
		padding: 14px;
		font-size: .84rem;
	}

	/* Resumen final más compacto. */
	.zqp-card-row {
		font-size: .76rem;
	}

	.zqp-card-img {
		width: 44px;
		height: 44px;
	}
}

/* Pantallas muy bajas en horizontal: se recorta aún más el encabezado. */
@media (max-height: 620px) and (max-width: 560px) {
	.zqp-head {
		margin-bottom: 10px;
	}

	.zqp-icon {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zqp-btn,
	.zqp-tipo-btn {
		transition: none;
	}
}

/* --- v2.0: validación y vendedor asignado --- */

.zqp-hint {
	display: block;
	margin: 5px 0 0 18px;
	font-size: .71rem;
	color: #9aa1ab;
	line-height: 1.4;
}

.zqp-field input.is-invalid {
	border-color: #dc2626;
	background: #fff5f5;
}

.zqp-field input.is-invalid:focus {
	outline-color: rgba(220, 38, 38, .16);
}

.zqp-seller {
	margin: 12px 0 0;
	font-size: .88rem;
	color: #555;
}

.zqp-seller strong {
	color: #222;
}

/* --- v2.1: resumen de la solicitud --- */

.zqp-check {
	text-align: center;
	margin-bottom: 10px;
}

.zqp-done-sub {
	margin: 0 0 4px;
	font-size: .88rem;
	color: #666;
	line-height: 1.5;
	text-align: center;
}

.zqp-card {
	border: 1px solid #e2e5ea;
	border-radius: 6px;
	overflow: hidden;
	margin: 16px 0 14px;
	text-align: left;
	background: #fff;
}

.zqp-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	background: #1f3a5f;
	color: #fff;
	padding: 10px 14px;
	font-size: .8rem;
	letter-spacing: .02em;
}

.zqp-card-head strong {
	font-family: monospace;
	font-size: .88rem;
}

.zqp-card-prod {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid #eef0f3;
}

.zqp-card-img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 4px;
	flex: 0 0 auto;
	background: #f6f6f6;
}

.zqp-card-prod-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.zqp-card-prod-name {
	font-size: .86rem;
	font-weight: 700;
	line-height: 1.35;
	color: #1f3a5f;
}

.zqp-card-prod-sku {
	font-size: .74rem;
	color: #8a8f98;
}

.zqp-card-data {
	padding: 10px 14px 12px;
}

.zqp-card-row {
	display: flex;
	gap: 12px;
	padding: 4px 0;
	font-size: .8rem;
	line-height: 1.5;
}

.zqp-card-k {
	flex: 0 0 34%;
	color: #8a8f98;
}

.zqp-card-v {
	flex: 1 1 auto;
	color: #333;
	font-weight: 600;
	word-break: break-word;
}

.zqp-actions {
	display: grid;
	gap: 8px;
}

.zqp-btn-ghost {
	display: block;
	width: 100%;
	padding: 13px;
	text-align: center;
	text-decoration: none;
	font-family: inherit;
	font-size: .85rem;
	font-weight: 700;
	color: #1f3a5f;
	background: #fff;
	border: 1px solid #d6dbe2;
	border-radius: 7px;
}

.zqp-btn-link {
	display: block;
	text-align: center;
	text-decoration: underline;
	font-size: .8rem;
	color: #6b7280;
	padding: 4px;
}

.zqp-btn-link:hover {
	color: #fe5200;
}

.zqp-btn-ghost:hover {
	background: #f6f8fb;
}

.zqp-note {
	margin: 12px 0 0;
	padding: 9px 12px;
	background: #fdf8e6;
	border: 1px solid #f0e2a8;
	border-radius: 4px;
	font-size: .74rem;
	line-height: 1.5;
	color: #7a6414;
	text-align: left;
}

/* ---------------------------------------------------------------
 * v2.2: página de detalle de la solicitud
 * El ancho coincide con el del formulario para mantener coherencia.
 * ------------------------------------------------------------ */

.zqp-detalle {
	max-width: 500px;
	margin: 0 auto;
	font-family: inherit;
	color: #222;
}

.zqp-detalle * ,
.zqp-detalle *::before,
.zqp-detalle *::after {
	box-sizing: border-box;
}

.zqp-detalle-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.zqp-detalle-fecha {
	font-size: .8rem;
	color: #8a8f98;
}

.zqp-detalle-estado {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .02em;
	padding: 4px 12px;
	border-radius: 20px;
	background: #fdf8e6;
	color: #7a6414;
	border: 1px solid #f0e2a8;
}

.zqp-estado-venta {
	background: #eaf7ef;
	color: #1a7f47;
	border-color: #bfe5cd;
}

.zqp-estado-no_interesado {
	background: #f6f7f9;
	color: #6b7280;
	border-color: #e2e5ea;
}

.zqp-detalle .zqp-actions {
	margin-top: 16px;
}

.zqp-detalle-pie {
	margin: 14px 0 0;
	font-size: .74rem;
	color: #9aa1ab;
	line-height: 1.5;
	text-align: center;
}

.zqp-detalle-aviso {
	padding: 22px;
	background: #f8f9fb;
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	text-align: center;
}

.zqp-detalle-aviso p {
	margin: 0;
	font-size: .9rem;
	color: #5b6270;
	line-height: 1.55;
}

/* --- Repuestos seleccionados desde el carrusel --- */

.zqp-extras {
	background: #f5f6f8;
	border: 1px solid #e6e9ee;
	border-radius: 7px;
	padding: 11px 14px;
	margin-bottom: 14px;
}

.zqp-extras-title {
	display: block;
	font-size: .76rem;
	font-weight: 700;
	color: #4a5260;
	margin-bottom: 6px;
}

.zqp-extras-list {
	margin: 0;
	padding-left: 16px;
	font-size: .78rem;
	line-height: 1.55;
	color: #5b6270;
	max-height: 110px;
	overflow-y: auto;
}

.zqp-extras-list li {
	margin: 0 0 2px;
}

/* Confirmación visual de los repuestos añadidos desde el carrusel. */

.zqp-extras-aviso {
	margin: 0 0 14px;
	padding: 10px 13px;
	background: #fff3ec;
	border: 1px solid #ffd4bd;
	border-radius: 7px;
	font-size: .78rem;
	line-height: 1.5;
	color: #b33a00;
}

.zqp-extras-aviso strong {
	font-size: .92rem;
}

/* Repuestos adicionales en la página de detalle. */

.zqp-extras-list {
	padding: 12px 14px;
	border-bottom: 1px solid #eef0f3;
	background: #fcfdfe;
}

.zqp-extras-title {
	display: block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .02em;
	color: #8a8f98;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.zqp-extra-item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid #f4f5f7;
	text-decoration: none;
	color: inherit;
}

.zqp-extra-item:last-child {
	border-bottom: 0;
}

.zqp-extra-item:hover .zqp-extra-name {
	color: #fe5200;
}

.zqp-extra-name {
	font-size: .82rem;
	font-weight: 600;
	line-height: 1.35;
	color: #1f3a5f;
}

.zqp-extra-sku {
	flex: 0 0 auto;
	font-size: .72rem;
	color: #9aa1ab;
	white-space: nowrap;
}

/* Enlace legal dentro del consentimiento. */

.zqp-consent-link {
	color: #fe5200;
	text-decoration: underline;
	font-weight: 600;
}

.zqp-consent-link:hover {
	color: #d64600;
}
