/**
 * PSB-PORTAL-FORMS-MEDIDAS-BOTONES-010 — medidas canónicas + texto blanco en botones oscuros.
 */

/* —— Botones oscuros: texto blanco siempre —— */
body.psb-pres-portal-shell .psb-pres-shell__stage a.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary),
body.psb-pres-portal-shell .psb-pres-shell__stage button.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary),
body.psb-pres-portal-shell .psb-pres-shell__stage input[type="submit"].psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary),
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-portal__btn--primary,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-live-price__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary),
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-shell-aside-actions__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary),
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-rail-d1d__btn-full:not(.psb-pres-portal__btn--ghost),
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-trabajo-pick-card__btn--primary {
	color: #fafaf9 !important;
	border-color: #1c1917;
}

body.psb-pres-portal-shell .psb-pres-shell__stage a.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):hover,
body.psb-pres-portal-shell .psb-pres-shell__stage a.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):focus,
body.psb-pres-portal-shell .psb-pres-shell__stage button.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):hover,
body.psb-pres-portal-shell .psb-pres-shell__stage button.psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):focus,
body.psb-pres-portal-shell .psb-pres-shell__stage input[type="submit"].psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):hover,
body.psb-pres-portal-shell .psb-pres-shell__stage input[type="submit"].psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary):focus,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-portal__btn--primary:hover,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-portal__btn--primary:focus,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-live-price__btn:not(.psb-pres-portal__btn--ghost):hover,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-live-price__btn:not(.psb-pres-portal__btn--ghost):focus,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-shell-aside-actions__btn:not(.psb-pres-portal__btn--ghost):hover,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-shell-aside-actions__btn:not(.psb-pres-portal__btn--ghost):focus {
	color: #ffffff !important;
	text-decoration: none;
}

body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-portal__btn:not(.psb-pres-portal__btn--ghost):not(.psb-pres-portal__btn--secondary) *,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-portal__btn--primary *,
body.psb-pres-portal-shell .psb-pres-shell__stage .psb-pres-live-price__btn:not(.psb-pres-portal__btn--ghost) * {
	color: inherit;
}

/* —— Bloque medidas canónico: diagrama izquierda + largo × ancho —— */
body.psb-pres-portal-shell .psb-pres-medidas-canonical__row {
	display: grid;
	grid-template-columns: minmax(72px, 1fr) 2.6rem minmax(72px, 1fr);
	align-items: end;
	gap: 0.4rem 0.55rem;
	width: 100%;
	min-width: 0;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__row--diagram {
	grid-template-columns: 52px minmax(72px, 1fr) 2.6rem minmax(72px, 1fr);
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__row--diagram.psb-pres-medidas-canonical__row--extra {
	grid-template-columns: 52px minmax(64px, 1fr) 2.6rem minmax(64px, 1fr) minmax(56px, 0.85fr);
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
	max-width: none;
	flex: none;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field .psb-pres-fp-medidas-field__label {
	display: block;
	margin-bottom: 0;
	font-size: 12px;
	font-weight: 600;
	color: #57534e;
	line-height: 1.3;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__field .psb-pres-fp-medidas-field__input {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	min-height: 44px;
	box-sizing: border-box;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__x {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: end;
	width: 2.6rem;
	min-height: 44px;
	margin: 0;
	padding: 0 0 0.58rem;
	font-size: 1.55rem;
	font-weight: 800;
	line-height: 1;
	color: #1c1917;
	user-select: none;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__diagram {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	align-self: end;
	padding-bottom: 0.52rem;
	opacity: 0.5;
	min-width: 0;
}

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: 44px;
	height: auto;
	max-width: 100%;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical__hint {
	margin: 0.5rem 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #78716c;
}

/* Overrides layout legacy que partían la fila */
body.psb-pres-portal-shell .psb-pres-form2026__medidas-layout {
	display: block;
	width: 100%;
	min-width: 0;
}

body.psb-pres-portal-shell .psb-pres-form2026__grid--medidas {
	display: contents;
}

body.psb-pres-portal-shell .psb-pres-medidas-canonical .psb-pres-fp-medidas-x {
	display: flex;
}

@media (max-width: 767px) {
	body.psb-pres-portal-shell .psb-pres-form2026 .psb-pres-fp-medidas-x.psb-pres-medidas-canonical__x {
		display: flex;
	}
}

@media (max-width: 520px) {
	body.psb-pres-portal-shell .psb-pres-medidas-canonical__row--diagram {
		grid-template-columns: 44px minmax(0, 1fr) 2.25rem minmax(0, 1fr);
	}

	body.psb-pres-portal-shell .psb-pres-medidas-canonical__row--diagram.psb-pres-medidas-canonical__row--extra {
		grid-template-columns: 44px minmax(0, 1fr) 2.25rem minmax(0, 1fr);
	}

	body.psb-pres-portal-shell .psb-pres-medidas-canonical__field--extra {
		grid-column: 1 / -1;
		max-width: 160px;
	}
}
