/**
 * PSB-PORTAL-MEDIDAS-ROW-003 — icono + Largo[input] × Ancho[input] (una ×, compacto).
 */

body.psb-pres-portal-shell {
	--psb-medidas-input-height: 44px;
	--psb-medidas-icon-width: 52px;
	--psb-medidas-field-w: 152px;
	--psb-medidas-prefix-w: 108px;
	--psb-medidas-extra-w: 120px;
	--psb-medidas-field-gap: 0.12rem;
	--psb-medidas-composer-gap: 0.4rem;
	--psb-medidas-x-gap: 0.4rem;
	--psb-medidas-x-width: 1.9rem;
	--psb-medidas-x-size: 1.55rem;
}

/* —— Fila: icono · campos · × · campos —— */
body.psb-pres-portal-shell .psb-pres-medidas-canonical__composer {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-end;
	gap: var(--psb-medidas-composer-gap);
	width: 100%;
	min-width: 0;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field {
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	gap: var(--psb-medidas-field-gap);
	min-width: 0;
	width: min(var(--psb-medidas-field-w), 100%);
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field--prefix {
	width: min(var(--psb-medidas-prefix-w), 100%);
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field--extra {
	width: min(var(--psb-medidas-extra-w), 100%);
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__label {
	display: block;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	color: #44403c;
	line-height: 1.2;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__input {
	width: 100%;
	min-width: 0;
	min-height: var(--psb-medidas-input-height);
	box-sizing: border-box;
}

/* Icono: visible, discreto, alineado con inputs */
body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram {
	flex: 0 0 var(--psb-medidas-icon-width);
	width: var(--psb-medidas-icon-width);
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	height: var(--psb-medidas-input-height);
	margin: 0;
	padding: 0;
	opacity: 1;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram .psb-pres-form2026-medidas-diagram {
	margin: 0;
	line-height: 0;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram .psb-pres-form2026-medidas-diagram__svg {
	display: block;
	width: 46px;
	height: auto;
	max-width: 100%;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram .psb-pres-form2026-medidas-diagram__plane {
	fill: #f5f5f4;
	stroke: #a8a29e;
	stroke-width: 1.25;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram .psb-pres-form2026-medidas-diagram__tick {
	stroke: #78716c;
	stroke-width: 1.25;
}

/* Una sola × — centrada en altura del input */
body.psb-pres-portal-shell .psb-pres-medidas-canonical__x,
body.psb-pres-portal-shell .psb-pres-fp-medidas-x.psb-pres-medidas-canonical__x {
	flex: 0 0 var(--psb-medidas-x-width);
	width: var(--psb-medidas-x-width);
	height: var(--psb-medidas-input-height);
	margin: 0 var(--psb-medidas-x-gap);
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: flex-end;
	font-size: var(--psb-medidas-x-size);
	font-weight: 600;
	line-height: 1;
	color: #57534e;
	user-select: none;
}

/* Ocultar layout anterior */
body.psb-pres-portal-shell .psb-pres-medidas-canonical__pair,
body.psb-pres-portal-shell .psb-pres-medidas-canonical__labels-row,
body.psb-pres-portal-shell .psb-pres-medidas-canonical__inputs-row,
body.psb-pres-portal-shell .psb-pres-medidas-canonical__slot {
	display: none !important;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__hint {
	margin: 0.45rem 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #65625c;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical--embedded {
	width: 100%;
	min-width: 0;
}

@media (max-width: 640px) {
	body.psb-pres-portal-shell .psb-pres-medidas-canonical__composer {
		flex-wrap: wrap;
		row-gap: 0.5rem;
	}

	body.psb-pres-portal-shell .psb-pres-medidas-canonical__field--largo,
	body.psb-pres-portal-shell .psb-pres-medidas-canonical__field--ancho {
		flex: 1 1 0;
		max-width: none;
	}
}

@media (max-width: 520px) {
	body.psb-pres-portal-shell {
		--psb-medidas-x-size: 1.4rem;
		--psb-medidas-x-width: 1.65rem;
		--psb-medidas-icon-width: 44px;
	}

	body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram .psb-pres-form2026-medidas-diagram__svg {
		width: 38px;
	}
}
