/**
 * Aislamiento visual LPFD — capa propia, sin depender del tema activo.
 * Cargar siempre DESPUÉS de front.css (dependencia: lpfd-front).
 * Selectores: #lpfd-ui-cabinet-root + .lpfd-ui-iso y equivalentes en admin/modal.
 */

#lpfd-ui-cabinet-root.lpfd-ui-iso,
.lpfd-admin-forms-popup.lpfd-ui-iso,
#lpfd-fluent-modal.lpfd-ui-iso,
.lpfd-documents-admin.lpfd-ui-iso,
.lpfd-customer-panel-forms.lpfd-ui-iso {
	--lpfd-iso-fg: #0f172a;
	--lpfd-iso-border: #cbd5e1;
	--lpfd-iso-bg: #ffffff;
	--lpfd-iso-primary: #1a7efb;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	color: var(--lpfd-iso-fg) !important;
	line-height: 1.45 !important;
}

#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-form-item,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-form-item {
	font-family: inherit !important;
	color: inherit !important;
}

/* Botones: anula gradientes/variables de tema (p. ej. "rosa") */
#lpfd-ui-cabinet-root.lpfd-ui-iso button[type="button"].latepoint-btn,
.lpfd-admin-forms-popup.lpfd-ui-iso button[type="button"].latepoint-btn,
#lpfd-fluent-modal.lpfd-ui-iso button[type="button"].latepoint-btn,
.lpfd-documents-admin.lpfd-ui-iso button[type="button"].latepoint-btn,
.lpfd-customer-panel-forms.lpfd-ui-iso button[type="button"].latepoint-btn,
#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn {
	appearance: none !important;
	-webkit-appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	font: inherit !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	border-radius: 6px !important;
	padding: 6px 14px !important;
	min-height: 32px !important;
	background: var(--lpfd-iso-bg) !important;
	color: var(--lpfd-iso-fg) !important;
	border: 1px solid var(--lpfd-iso-border) !important;
	box-shadow: none !important;
	background-image: none !important;
	filter: none !important;
}

#lpfd-ui-cabinet-root.lpfd-ui-iso button.latepoint-btn:hover,
.lpfd-admin-forms-popup.lpfd-ui-iso button.latepoint-btn:hover,
#lpfd-fluent-modal.lpfd-ui-iso button.latepoint-btn:hover,
.lpfd-documents-admin.lpfd-ui-iso button.latepoint-btn:hover,
.lpfd-customer-panel-forms.lpfd-ui-iso button.latepoint-btn:hover,
#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn:hover,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn:hover {
	background: #f8fafc !important;
	border-color: #94a3b8 !important;
	color: var(--lpfd-iso-fg) !important;
}

/* Contorno gris (outline) explícito */
#lpfd-ui-cabinet-root.lpfd-ui-iso button.latepoint-btn-outline,
.lpfd-admin-forms-popup.lpfd-ui-iso button.latepoint-btn-outline,
.lpfd-documents-admin.lpfd-ui-iso button.latepoint-btn-outline,
.lpfd-customer-panel-forms.lpfd-ui-iso button.latepoint-btn-outline,
#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn-outline,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-upload-label > span.latepoint-btn-outline {
	background: #fff !important;
	color: #0f172a !important;
	border: 1px solid #94a3b8 !important;
}

/* Primary (admin) */
.lpfd-documents-admin.lpfd-ui-iso button.latepoint-btn-primary,
.lpfd-admin-forms-popup.lpfd-ui-iso button.latepoint-btn-primary,
#lpfd-fluent-modal.lpfd-ui-iso button.latepoint-btn-primary {
	background: var(--lpfd-iso-primary) !important;
	color: #fff !important;
	border-color: var(--lpfd-iso-primary) !important;
}

.lpfd-documents-admin.lpfd-ui-iso a.latepoint-btn,
.lpfd-documents-admin.lpfd-ui-iso a.latepoint-btn.latepoint-btn-outline {
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	box-sizing: border-box !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	padding: 6px 14px !important;
	border-radius: 6px !important;
	background: #fff !important;
	color: #0f172a !important;
	border: 1px solid #94a3b8 !important;
	text-decoration: none !important;
}

/* Enlaces "View PDF" en fila */
#lpfd-ui-cabinet-root.lpfd-ui-iso a.lpfd-view-pdf,
.lpfd-admin-forms-popup.lpfd-ui-iso a.lpfd-view-pdf {
	color: #1d4ed8 !important;
	font-weight: 500 !important;
	text-decoration: underline !important;
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	font-size: inherit !important;
	display: inline !important;
}

#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-sep,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-sep {
	color: #94a3b8 !important;
}

/* Badges de estado */
#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-form-item-status,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-form-item-status {
	font-size: 12px !important;
	font-weight: 600 !important;
}

#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-status-rejected,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-status-rejected {
	color: #b91c1c !important;
	background: #fef2f2 !important;
}

/* Cierre modal: neutro, sin heredar color de tema */
#lpfd-fluent-modal.lpfd-ui-iso .lpfd-fluent-modal-close {
	background: #f1f5f9 !important;
	color: #334155 !important;
	border: 0 !important;
}

/* Mensajes bajo fila: legibles sin mezclar con alertas del tema */
#lpfd-ui-cabinet-root.lpfd-ui-iso .lpfd-form-item-message.lpfd-msg-error,
.lpfd-admin-forms-popup.lpfd-ui-iso .lpfd-form-item-message.lpfd-msg-error {
	background: #fef2f2 !important;
	color: #991b1b !important;
	border: 1px solid #fecaca !important;
	border-radius: 6px !important;
	padding: 8px 10px !important;
	font-size: 13px !important;
}
